Skip to content

Instantly share code, notes, and snippets.

@tamalw
Created November 20, 2009 17:13
Show Gist options
  • Save tamalw/239637 to your computer and use it in GitHub Desktop.
Save tamalw/239637 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'rack/utils'
@@datastore = []
get '/' do
if params[:t]
@@datastore.unshift(Rack::Utils.unescape(params[:t]))
"a"
else
"I'm Tiny!"
end
end
get '/T' do
halt 404
end
get '/a' do
@@datastore.pop
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment