This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 +|||+|||+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'dm-core' | |
require 'dm-validations' | |
require 'dm-timestamps' | |
require 'syntaxi' | |
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/toopaste.sqlite3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is so fucking awesome! |
NewerOlder