Ever had a situation where you want to send a file to a friend at work or something, and sending it over email makes you feel all dirty?  One way to solve the problem is to copy the file into /var/www/foo or something and send a link… we’ve all done it.  But there’s a better way :)

Python can be used for web programming, and the language has builtin code for reference implementations of stuff.  This comes in really handy, for this type of situation.  Check it:

cd ~/Desktop
python -m SimpleHTTPServer

Then fire up your favorite web browser to: http://localhost:8000 (put your hostname in there).  When your buddy has looked at your super slick file… ctrl+c the thingy, and you’re done.  Pretty slick.