Friday, November 30, 2007

rename usb disk volume label (FAT32)

HowTo
sudo mlabel -i /dev/sdc1 ::my-label

Afterwards copy original boot sector to backup using
sudo dosfsck -ar /dev/sdc1

backup ubuntu / debian package selection list

HowTo

Backup:
sudo dpkg --get-selections > dpkglist.txt

Restore:
sudo dpkg --set-selections < dpkglist.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade

Wednesday, November 21, 2007

mplayer down-mix stereo to mono

mplayer −af pan=1:0.5:0.5 input

Monday, November 19, 2007

remote firefox over ssh

ssh -Y
firefox -no-remote &

Saturday, November 10, 2007

typesetting poems with LaTeX

the texlive-humanities package includes the LaTeX package verse.

Tuesday, November 6, 2007

multiple plots in one window with gnuplot

Display colors and point types:
test

For data plots:
set terminal postscript eps monochrome enhanced dashed
set output "distplot.eps"
set style data linespoints
set title "Minimum Distance"
set xlabel "m"
set ylabel "toroidal minimum distance"
set logscale xy 2
plot "mindists.dat" using 1:2 title "Sobol'", "mindists.dat" using 1:3 lt 3 title "Larcher-Pillichshammer"

Modifying the data columns (e.g. plot differences):
plot 'force.dat' using 1:($3-$2)
plot 'force.dat' using (3*$2):(sin($3+$1))


Don't clear the window, very general method:
set multiplot

# common margins
set lmargin 10
set rmargin 2

# common y-range
set yrange [0:1.3e+9]

plot "values.dat" using 1:2 title "f1"
plot "values.dat" using 1:3 lt 3 title "f2"
...
clear
unset multiplot

converting binary and decimal numbers with maple

from decimal to binary:
convert(12345, binary);

from binary to decimal:
convert(11000000111001, decimal, binary);