Skip to content

Instantly share code, notes, and snippets.

View codahale's full-sized avatar
🦆
Look at all these chickens

Coda Hale codahale

🦆
Look at all these chickens
View GitHub Profile
#!/usr/bin/env ruby
$existing_methods = []
def print_methods(library)
new_methods = [].methods.sort - $existing_methods
for method in new_methods
puts "Array##{method}"
end
puts "(total: #{new_methods.size} added by #{library})\n\n"
# coda@lunchbox /L/R/G/1/specifications> less jsonpretty-1.0.0.gemspec
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{jsonpretty}
s.version = "1.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Sieger"]
s.date = %q{2009-02-19}
--- LastFM - Ban Current Track
set previousApp to name of (info for (path to frontmost application))
tell application "Last.fm" to activate
tell application "System Events" to keystroke "b" using command down
open location "x-launchbar:hide"
tell application previousApp to activate
#!/usr/bin/env ruby
# Written by Coda Hale <coda.hale@gmail.com>. MIT License. Go for it.
def include_pattern(filename)
core = filename.gsub(/_spec/, "").gsub(/\Aspec\//, "")
return Regexp.quote(core)
end
if ARGV.empty? || ARGV == ["--help"] || ARGV == ["-h"]
STDERR.puts("Usage:")
@codahale
codahale / gist:41459
Created December 30, 2008 00:45 — forked from damon/gist:41453
def whack(objects)
return Hash[*objects.map{ |o| [o.send("table_name"), o.send("delete_all")] }.flatten]
end