Skip to content

Instantly share code, notes, and snippets.

View darlandieterich's full-sized avatar
🏃
hurry up, the day is ending

darlan dieterich darlandieterich

🏃
hurry up, the day is ending
View GitHub Profile
@h0rs3r4dish
h0rs3r4dish / humane-examples.rb
Created December 17, 2009 04:42
HumaneBrick: WEBrick for sane people
require 'humane'
server = HB::Server.new # use "include HB" for even more fun
server.path "/" do # Hello world, HB style
write true, "h1. Hello, world!" # write() = puts() for the web; hx. = <hx></hx>
write true, "The URL you entered was '%s'" % url # Just pop that word in there and enjoy
end
server.path "/submit" do |name| # auto-magically gives you POST/GET-ed variables