Skip to content

Instantly share code, notes, and snippets.

View cohuman's full-sized avatar

Mindjet Tasks Developer cohuman

View GitHub Profile
# A simple app that implements a naive session-based login, to demonstrate the problems with testing sessions in Sinatra.
require 'rubygems'
require 'sinatra/base'
class LoginApp < Sinatra::Base
enable :sessions
get '/' do
@cohuman
cohuman / chore.rake
Created May 5, 2012 00:41
rake task to flush our redis cache
desc "flush the cache"
task :flush_cache do
puts <<-HERE
_
.----------/ |<=== floppy disk
/ | |
/ /| | _________
/ / | | | .-----. |
/___________/ /| | |=| |-|
[____________]/ | | |~|_____|~|