sábado, 1 de octubre de 2016

Audacity: Audio Error

Using audacity in fedora 20, Actually I have faced an issue with the audio, strange error as the following one was printed in the terminal:

ALSA lib pcm.c snd_pcm_recover underrun occurred

So in this forum the solution was pointed to restart pulseaudio, which is a proxy sound application:

stop
>pulseaudio --kill
and then restart
>pulseaudio --start

About above command in the forum redirect to this site that explain a little bit further about pulse audio so first need to know your enemy before defeat it.

jueves, 29 de septiembre de 2016

QDirStat : See Usage files in a path linux

Qdirstat is similar to windirstat, so in this link I've found suggestion to use that tool, so I've installed in fedora 20, because want to check files importants in my disk before format.
Find the source in this link.

I faced an issue with qmake which is fixed just running (link)
yum -y install qt-devel
export qmake=/usr/bin/qmake-qt4

Let's check how to install g++, no remember if I installed it (link).

This site said to install c++
> yum install gcc-c++


lunes, 30 de noviembre de 2015

Server/Box and DB configuration

1) CHARACTERSET deal
Personally I have faced one issue when I was reading directly from a unix box server to be processed and dump into my oracle database. The unmanaged character was ñ so let's detailed the picture.

********* ini text file ****************
esteban|adulto
aidan|niño
chavela|adulta
nana|niña
********* ini text file ****************

2) Run commands using ssh without need login (link, link2)
ssh -t user@example.com "/home/user/bin/detach ls"

unix recipes

1. Transform lines text into one pipeline separated line (link)
echo $VALUES | tr '\n' ' '

2. Crontab
Check this link to create and a tool to automatic generate line in unix

jueves, 25 de junio de 2015

SHELL Script

1.- If
The issue addressed is when is required to test if file is empty. But before that is needed to check if the file exist, I tried this and it worked.

[ -f /etc/hosts ] && echo "Found" || echo "Not found"

2.- Variable empty
Check if a variable is empty before to check if the file path in the variable exist.

if [ -z "$var" ]
then
echo "\$var is empty"
else
echo "\$var is NOT empty"
fi


3.- Convert from ogg to mp3
ffmpeg -i audio.ogg -acodec libmp3lame audio.mp3
And also the script. 
 
 
4. Process a list of files
In this link is showed how
for i in *.txt

5. Execute scripts remotely using a local script
ssh pepito@bigserver.com.pe < ./src/main/resouces/shell_scripts/unix_code.sh
check this link for more details