Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Shoemaker shoe

View GitHub Profile
View gist:666dea4c80b84ae75b5a
5292,
7125,
9326,
13400,
15343,
18051,
18563,
19059,
19068,
19376,
View gist:9645271
"Color 1","ef3434"
"Color 2","577667"
"Color 3","6.28e+72"
"Color 4","4555f3"
"White","ffffff"
"Color 5","5.11e+28"
"Color 6","458af8"
"Color 7","b44e33"
"Color 8","7.23e+11"
"color 9","8.15e+02"
@shoe
shoe / interval.js
Created May 9, 2012 — forked from manast/interval.js
Accurate Javascript setInterval replacement
View interval.js
function interval(duration, fn){
this.baseline = undefined
this.run = function(){
if(this.baseline === undefined){
this.baseline = new Date().getTime()
}
fn()
var end = new Date().getTime()
this.baseline += duration
View gist:1314383
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
login = "https://#{subdomain}.airbrake.io/login"
page = agent.get(login)
# login
page.form.field_with(:id => "session_email").value = email
page.form.field_with(:id => "session_password").value = password
@shoe
shoe / gist:587897
Created Sep 20, 2010
Navionics Training Notes
View gist:587897
Navionics Training Notes
# To clone:
$ git clone git@mojotech.unfuddle.com:mojotech/navionics.git
# From ~/.gitconfig
[branch]
autosetupmerge = true
[alias]
b = branch
View gist:181198
commit 036a3ed9bc2778f6931a2039df309a7178fcf7e1
Author: Chris Shoemaker <chris.shoemaker@cox.net>
Date: Fri Aug 14 17:28:19 2009 -0400
Fix the clearance route precedence hack to account for reloading.
diff --git a/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/rou
index 1a6c43b..6581346 100755
--- a/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/routes.rb
+++ b/vendor/gems/thoughtbot-clearance-0.6.9/lib/clearance/extensions/routes.rb
View gist:13659
1.upto(1000) {|n|
File.open("db/migrate/#{sprintf("%03.0f", n)}_t#{n}.rb", "w") {|f|
tmp = <<-code
puts #{n}
class T#{n} < ActiveRecord::Migration
def self.up; end
def self.down; end
end
code
View file1.txt
Read this file please. NOW! Pretty please?