Public Gists by raggi

gist: 232966 A helper to alias a task in...
Gravatar
Thu Nov 12 07:11:46 -0800 2009
1
2
3
def alias_task(name, old_name)
  t = Rake::Task[old_name]
  desc t.full_comment if t.full_comment
gist: 232478 A quick hack to post messag...
Gravatar
Wed Nov 11 16:43:53 -0800 2009
1
2
3
#!/usr/bin/env ruby
 
domain, room, *message = ARGV
gist: 175668 dynamic, lazy tests
Gravatar
Wed Aug 26 10:41:17 -0700 2009
1
2
3
o = type.new
setters = o.methods.grep(/[^\]]=$/)
setters.each do |s|
Gravatar
Thu Aug 06 05:50:22 -0700 2009
1
2
3
def eq?(x, y)
  x.all? { |o| x.count(o) == y.count(o) }
end
Gravatar
Wed Aug 05 13:45:39 -0700 2009
1
2
3
def times_for_period(date)
  regular_hours_by_week = Hash.new(0)
  
Gravatar
Wed Aug 05 11:41:13 -0700 2009
1
2
3
require "benchmark"
 
KEY = '1234567890'
Gravatar
Wed Aug 05 11:27:33 -0700 2009
1
2
3
require "benchmark"
 
STRING = '1234567890'
Gravatar
Tue Aug 04 15:17:39 -0700 2009
1
2
3
require 'benchmark'
 
def many
gist: 158045 Should this work? Do you kn...
Gravatar
Wed Jul 29 04:43:25 -0700 2009
1
2
3
# The Question: Should this work?
# The Bonus Question: Does it, and in what capacity?
 
gist: 148543 bigdecimal char_round
Gravatar
Thu Jul 16 10:18:58 -0700 2009
1
2
3
require "benchmark"
require 'bigdecimal'
 
Gravatar
Sun Jul 05 15:56:11 -0700 2009
1
2
3
require "benchmark"
 
@callbacks = %w(
Gravatar
Thu Jun 18 10:04:57 -0700 2009
1
2
3
module Enumerable
  def return
    each do |i|
Gravatar
Thu Jun 18 04:14:51 -0700 2009
1
2
3
require "benchmark"
class Hash
  # Performs the opposite of <tt>merge</tt>, with the keys and values from the first hash taking precedence over the second.
gist: 119733 EventMachine.crank
Gravatar
Thu May 28 19:20:41 -0700 2009
1
2
3
require 'thread'
 
module EventMachine
gist: 104213 show the effects of stack s...
Gravatar
Wed Apr 29 19:40:47 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
require "benchmark"
Gravatar
Sat Mar 28 03:42:05 -0700 2009
1
2
3
module EventMachine
  # == EventMachine::Channel
  #
gist: 81199 sinatra as rails metal exam...
Gravatar
Wed Mar 18 08:40:42 -0700 2009
1
2
3
require 'sinatra/metal'
 
class SinatraMetal < Sinatra::Base
gist: 80247 eventmachine postgres to se...
Gravatar
Mon Mar 16 19:47:28 -0700 2009
1
2
3
# I stole this code from em-mysql (tmm1 <3)
module Sequel
  class Database
gist: 79926 Example implementation for ...
Gravatar
Mon Mar 16 08:26:36 -0700 2009
1
2
3
# async_sinatra_example.ru
require 'sinatra'
 
Gravatar
Tue Feb 10 04:36:06 -0800 2009
1
2
3
class FiberedMutex
  #
  # Creates a new FiberedMutex