Skip to content

Instantly share code, notes, and snippets.

View JackDanger's full-sized avatar

Jack Danger JackDanger

View GitHub Profile
require 'rubygems'
require 'yaml'
require 'set'
SEATTLERB = [
'aaron patterson',
'alex vollmer',
'andy smith',
'damon danieli',
'dave myron',
module Shoulda
module Macros
def should_change(expression, options = {})
by, from, to = get_options!([options], :by, :from, :to)
stmt = "change #{expression.inspect}"
stmt << " from #{from.inspect}" if from
stmt << " to #{to.inspect}" if to
stmt << " by #{by.inspect}" if by
expression_eval = lambda { eval(expression) }
#!/usr/bin/env ruby
# urlmonitor - print out the URLs requested system wide on the main network interface
# Accept a network interface name as an optional argument
iface = ARGV.first
# No interface specified? Try to guess which one is king..
unless iface
`ifconfig -l`.split.each do |iface|
next if iface =~ /^lo/
# Saves an MP3 of the phrase using Google's text-to-voice.
#
# USAGE
#
# From the command line:
#
# $ ruby google-say.rb Hello World
#
# Or you can just require it and call Google.say(phrase)
require 'open-uri'
@JackDanger
JackDanger / t.rb
Created January 21, 2011 00:17 — forked from joevandyk/t.rb
class C
attr_accessor :b
def foo
b ? b.foo : raise(NoMethodError.new)
end
alias gob foo
@JackDanger
JackDanger / 1.9.3-p545-railsexpress.diff
Last active August 29, 2015 14:02 — forked from xaviershay/require-performance-fix-r31758.patch
Xavier Shay's Kernel#require speedup
diff --git a/.gitignore b/.gitignore
index 57557c9..7955376 100644
--- a/.gitignore
+++ b/.gitignore
@@ -129,3 +129,4 @@ y.tab.c
# /win32/
/win32/*.ico
+ext/win32ole/.document
diff --git a/array.c b/array.c