Skip to content

Instantly share code, notes, and snippets.

View entp's full-sized avatar

ENTP entp

View GitHub Profile
module TokenGenerator
@@chars = (('a'..'z').to_a + ('0'..'9').to_a) - %w(i o 0 1 l 0)
@@char_size = @@chars.size
extend self
def generate_simple
(1..8).collect { |a| @@chars[rand(@@char_size)] }.join
end
end
# /path/to/seinfeld/app/config.ru
require 'rubygems'
require 'rack'
require 'sinatra'
Sinatra::Application.default_options.update(
:run => false,
:env => :production,
# nfi why this is needed, shouldn't it pick up the pwd???
:views => '/path/to/seinfeld/app/views',
<!-- for some reason this isn't receiving my style! -->
<pee class="tl-body viewsource"><%= foo.bar %></pre>