//Tips tagged curl
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
YouTube is great, but the embedded flash player doesn't offer a lot in the way of customizing your viewing experience. There are quite a few options for downloading flv video files from YouTube, but adding the following function to your bashrc will let you stream them directly to your choice of media player.

function mtube {
  video_id=$(curl -s $1 | sed -n "/watch_fullscreen/s;.*\(video_id.\+\)&title.*;\1;p");
  mplayer -fs $(echo "http://youtube.com/get_video.php?$video_id");

This should work with any URL of the form http://www.youtube.com/watch?v=[video id here], for example:

mtube http://www.youtube.com/watch?v=evQ0QNi2CzA

View Comments »

Use this command to backup your del.icio.us bookmarks from the commandline with curl.

curl -u username -o bookmarks.xml https://api.del.icio.us/v1/posts/all

Or, using wget

wget --user=username --password=password https://api.del.icio.us/v1/posts/all -O bookmarks.xml

View Comments »

The command below uses the debian device driver check and report service at http://kmuto.jp/debian/hcl/index.cgi to give a report on your PCI devices.

As it mentions on the site:
* This database uses the PCI map of Debian kernel 2.6.29-1-686.
* The result does NOT guarantee your hardware works perfectly.
* This database only verifies the PCI devices at this time. X drivers, ISA, USB, IEEE1394 or any other devices are out of the focus.

curl --silent -d "check=Check&lspci=$(lspci -n)" http://kmuto.jp/debian/hcl/index.cgi | \
sed -n '/<table>/,/<\/table>/ p' | lynx -stdin

View Comments »

This script will run check a for the Ubuntu 9.10 launch once every 5 mins and let you know when it's available:

while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ];
then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300;  done

View Comments »

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit