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.
http://video.google.com/googleplayer.swf?docId=1234501631358404955
Replace the front part like this:
http://video.google.com/videoplay?docid=1234501631358404955,
There you can download the video.

Friday, July 4, 2008

vim pdflatex mapping

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

Thursday, June 19, 2008

Alice DSL and Linksys AG241-DE Router

Falls die Einwahl nicht funktioniert:
Im Feld "Dienstname" nichts eintragen!

Wednesday, April 30, 2008

vim word movement with underscore delimiter

see VIM FAQ, 12.35.
:set iskeyword-=_

Also see the camelcasemotion plug-in, described in one of the comments below by leoc.me.

VIM Quick Reference Card

Link

SCons error with Ubuntu Hardy: "scons: *** object of type 'int' has no len()"

delete .sconsign.dblite, since the function convert_old_entry in /usr/lib/scons/SCons/Node/FS.py that should handle old formats of .sconsign.dblite is buggy.