Skip to content

Instantly share code, notes, and snippets.

@aerith
aerith / webapp.rb
Created November 19, 2010 07:42 — forked from igrigorik/webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
if !func.nil? &&
@aerith
aerith / gist:573142
Created September 10, 2010 05:15 — forked from sorah/gist:573131
<?php
array_map(function ($i) { $s=($i%3==0?'Fizz':'').($i%5==0?'Buzz':''); $s=($s=="")?$i:$s; print "${s}\n"; }, range(1,100));