Geekery

What do you do when your college plays at 2pm and you are stuck at work with no TV around? You write a CGI to grab screenshots from your TV so you can watch it on a webpage, of course.

#! /bin/sh
echo Content-type: image/jpeg
echo

mplayer -frames 1 -vo jpeg -nosound /dev/video >/dev/null 2>&1
cat 00000001.jpg