Skip to content

Instantly share code, notes, and snippets.

View therabidbanana's full-sized avatar

David Haslem therabidbanana

  • Pathstream
  • San Francisco
View GitHub Profile
@therabidbanana
therabidbanana / config.ru
Created July 8, 2010 04:14
(Nearly) Smallest possible orange-sparkles site
#-s thin -p 5432
require "rubygems"
require 'orange-sparkles'
app = Orange::SparklesApp.app
app.orange.options["main_user"] = "[email protected]"
run app
@therabidbanana
therabidbanana / hello_world.rb
Created June 15, 2010 04:57
An extremely convoluted hello world
#!/usr/bin/env ruby
require 'yaml'
# Prints out the string "Hello World!" in
# an extremely convoluted way involving
# method_missing magic, dynamic method calls,
# some metaprogramming, completely useless comments,
# the DATA block, yaml, and Sesame Street.
#
# This hello world brought to you by the letter Q.
@tmm1
tmm1 / em-irb-console.rb
Created July 12, 2009 01:17
networked irb server/client in EM
require 'rubygems'
require 'eventmachine'
module Console
PROMPT = "\n>> ".freeze
def post_init
send_data PROMPT
send_data "\0"
end