Skip to content

Instantly share code, notes, and snippets.

View delano's full-sized avatar
👋
Let's talk about building teams

Delano delano

👋
Let's talk about building teams
View GitHub Profile
Sec total new wait
1 50 50 0 +
2 100 50 50 |+
3 150 50 100 ||+
4 200 50 150 |||+
5 250 100 150 +|||+
6 300 100 200 |+|||+
7 350 100 250 ||+|||+
8 400 100 300 |||+|||+
9 450 150 300 +|||+|||+
# uri_params
#
# Turn URI parameters like uri[0], uri[1]... into an array of values
# and ones like account[id], account[name]... into a hash
# This needs to be called inside of a "post" or "get" command. It doesn't work when placed inside the "before" (?)
def uri_params_fix!
p = params
p.each_pair do |key_with_index, value|
# where args is a hash of URI parameters
def initialize(args = {})
unless args.empty?
# I want to avoid doing this
#self.title = args[:title]
#self.uri = args[:uri]
# and check the parameters names dynamically
args.each do |n,v|
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
require 'syntaxi'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/toopaste.sqlite3")
@delano
delano / gist:180
Created July 21, 2008 20:45 — forked from dfischer/gist:170
undefined
This is so fucking awesome!