Monday, April 21, 2008

grep alias with arguments and filter

alias mygrep 'grep -i -R \!^ * | grep -v \.svn'

(!^ passes the first argument)

(works only in cshell, for bash use something like this.)

Sunday, March 30, 2008

skype on ubuntu gutsy amd64

install using AMD64 section of this HowTo.
(extract .deb packages using "-x", use LD_LIBRARY_PATH when starting skype.)

install webcam driver as described here. it is important to remove the old driver from its location.

Saturday, March 22, 2008

encode png images to x264 avi

for i in `seq 1 3`; do mencoder mf://*.png -sws 10 -vf scale=800:592 -ovc x264 -x264encopts qp=40:subq=7:pass=$i -o output.avi; done

Monday, March 3, 2008

debug http web form url

Save the page to your local disk and change the method to a get instead of submit and you'll see the values in the addressbar.

even more useful: Live HTTP Headers Addon

Friday, February 15, 2008

apt-get changelog

Manually for each package:
aptitude changelog package-name

Automatically for each upgrade (and of course also manually):
sudo apt-get install apt-listchanges
sudo dpkg-reconfigure apt-listchanges

Tuesday, February 12, 2008

crop and rescale without blur

see examples here.

convert input.png -crop 128x128+571+569 +repage -scale 1024x1024 output.png

With geometry argument as described here.
(width x height +offset_x +offset_y)

The positions of the filenames are important!

Tuesday, February 5, 2008

rename mp3 files using track number

for id3v2 tags:

for i in *.mp3; do num=`id3v2 --list "$i" | grep TRCK | cut -f 2 -d:`; mv "$i" "`printf %02d $num` - $i"; done