Tuesday, July 29, 2008

play all mp3s below a certain directory

(requires mpg123)

In bash, define the function myplay:

function myplay() { tmp=`mktemp`; find "`pwd`/$1" -name "*.mp3" | sort > $tmp; mpg123 -C -@ $tmp; rm $tmp ;}

Then simply use myplay dir/to/music. (This only works with relative paths.)

Wednesday, July 23, 2008

Download embedded google videos

The Flash SWF player doesn't work so well with Linux, so find the URL in the source code of the HTML page, e.g.
Replace the front part like this:
There you can download the video.

Friday, July 4, 2008

vim pdflatex mapping

:map <C-p> :w<CR>:!pdflatex %<CR>