Archive for February, 2011

How to download all videos from youtube playlist

26/02/2011 4 comments
for i in 1 26 51 76 101
for video in $(curl -s"$i" | grep -o "url='[^']*'")
id=$(echo $video | sed "s|url\='\(.*\)&.*'|\1|")
wget$id -qO- | sed -n "/fmt_url_map/{s/[\'\"\|]/\n/g;p}" | sed -n '/^fmt_url_map/,/videoplayback/p' | sed -e :a -e '$q;N;5,$D;ba' | tr -d '\n' | sed -e 's/\(.*\),\(.\)\{1,3\}/\1/' | wget -i - -O $n.flv
n=$(( $n + 1 ))

where PLAYLISTID is a ID taken from playlist url (ex.:

Categories: Bash, Linux, Useful commands

rsync with custom ssh port

24/02/2011 Leave a comment

rsync -r -h –partial –progress -e “ssh -p 43213” napi@* .

Categories: Bash, Linux, Useful commands

How to download files from premium with wget

24/02/2011 9 comments

First we need check if we have “Direct Download” option checked in:

Edit account / Advanced Features

Now we need to get a cookie, im using curl for that:

curl --cookie-jar cookies.txt --data "loginUserName=login" --data "loginUserPassword=password" --data "autoLogin=checked" --data "loginFormSubmit=Login"


login is your login name, and password is you password for

next we need to create our list with links to download. Use pico, vi or another favorite editor.

Now the final part:

wget -c --load-cookies /home/napi/cookies.txt -i /home/napi/links
Categories: Bash

Rename jpg files to exif creation date

19/02/2011 1 comment

exiv2 mv -r %Y%m%d_%H%M%S_:basename: *.jpg

Categories: Useful commands

Przepis na bigos

17/02/2011 Leave a comment

3kg kapusty kiszonej

1kg kiełbasy drobiowej

30dkg boczku

0,5kg cebuli

5-8 ziele angielskie

4-5 liść laurowy

pieprz w ziarnach



pokroić kapustę, wrzucić do garnka, gotować 5h.




Categories: Przepisy