A one-line web server in Ruby
Prodded by a tweet, here's how to serve a directory in one line of Ruby:
ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd).start'
Handy for sharing files at a conference, for example.
You can verify that I've written this post by following the verification instructions:
curl -LO http://barkingiguana.com/2010/04/11/a-one-line-web-server-in-ruby.html.orig
curl -LO http://barkingiguana.com/2010/04/11/a-one-line-web-server-in-ruby.html.orig.asc
gpg --verify a-one-line-web-server-in-ruby.html.orig{.asc,}
If you'd like to have a conversation about this post, email craig@barkingiguana.com. I don't bite.