jeltsch's blog

MySQL install

After installing the Suse 9 rpm, execute the following commands:

sudo /usr/bin/mysql_install_db
(Creating default databases & permissions. Apparently the same can be done by "sudo rcmysql start")

sudo /usr/bin/mysqld_safe --user=mysql &
(Start the server for the first time)
REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h hostname password 'new-password'

Editing (resizing, format converting, compressing) images in the command line with ImageMagick (mogrify, convert)

Resize all tif images in the current directory:

mogrify -resize 25% 25% *.tif

Resize all jpeg images in the current directory to a width of 614 pixels and keep the image ratio constant:

mogrify -resize 614 *.jpg

As above, but resize the hight to 614 pixels:

mogrify -resize x614 *.jpg

Convert all bmp imgaes in the current directory into tiff images:

mogrify -format tiff *.bmp

Compress all tiff images in the current directory with ZIP compression:

Changing sound volume or bitrate of mp3 files with lame

Sometimes the recording level of mp3 files is very low. If I do some jogging next to a busy road, I cannot hear anything even when the sound volume is on the max. Therefore I have to increase the volume of the mp3 file. Using lame you can do it with the following script:

#!/bin/bash
while [ $# -ge 1 ]; do
infn=$1
outfn="${infn%%.mp3}_3x.mp3"
echo $outfn
lame --mp3input -v --scale=3 $infn $outfn
shift 1
done

Pages