Skip to content

Instantly share code, notes, and snippets.

Working from home

Weston Triemstra thermistor

Working from home
Block or report user

Report or block thermistor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thermistor / delayed_job.rb
Created Nov 19, 2011
have failed jobs report via airbrake as well
View delayed_job.rb
# have failed jobs report via airbrake as well
# save it as config/initializers/delayed_job.rb
class Delayed::Worker
def handle_failed_job_with_airbrake(job, error)
handle_failed_job_without_airbrake(job, error)
thermistor / deploy.rb
Created Jun 26, 2012 — forked from ryanb/deploy.rb
Check to see if you have changes in head which have not been pushed before deploying
View deploy.rb
namespace :deploy do
desc "Make sure there is something to deploy"
task :check_revision, :roles => :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts "WARNING: HEAD is not the same as origin/master"
puts "Run `git push` to sync changes."
thermistor /
Last active Oct 6, 2015 — forked from wadtech/
Bootstrap Chef Solo for Ubuntu 12.04 LTS
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
tar -xvjf ruby-2.0.0-p195.tar.bz2
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
thermistor / gist:3107339
Created Jul 13, 2012 — forked from ericbeland/gist:846482
Slow Down webdriver in Capybara (Monkeypatch for 0.1.3)
View gist:3107339
# This is a total hack to slow down webdriver in Capybara
# so you can more easily watch what is happening.
# paste this above the top of a Capybara Webdriver RSpec test if you need to debug something in slo-mo
require 'selenium-webdriver'
module ::Selenium::WebDriver::Remote
class Bridge
def execute(*args)
View deploy.rb
set :user, 'application'
set :application, 'nayada'
set :deploy_to, "/#{user}/rails/#{application}-git"
ssh_options[:paranoid] = false
ssh_options[:port] = 389
role :app0, "", :primary => true
namespace :deploy do
thermistor / index.html
Created Aug 17, 2012 — forked from anonymous/index.html
This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
View index.html
<i class="macbook"></i>
thermistor / OPTIONS.rb
Created Sep 18, 2012 — forked from ajturner/OPTIONS.rb
make Rails respond to an HTTP OPTIONS method request
# Add to routes.rb
# Needed for responding to OPTIONS http method
map.connect '*path',
:controller => 'home',
:action => 'options_for_mopd',
:conditions => {:method => :options}
# in home_controller.rb
thermistor /
Created Nov 6, 2012 — forked from trodrigues/
kill script for phantom, buster, selenium
# just call with ./ buster-server|selenium|phantom
function get_buster_server_pid(){
echo `ps aux|grep buster-server|grep node|awk '{ print $2 }'`
function get_selenium_server_pid(){
echo `ps aux|grep selenium|grep java|awk '{ print $2 }'`
thermistor / gist:4064149
Created Nov 13, 2012 — forked from ebidel/gist:3723309
Spotlight bookmarklet
View gist:4064149
// Save this in a bookmarklet and click it on a page:
javascript:(function(){function d(a,c){"circle("+a+"px, "+c+"px, "+b+"px)"}var b=90;window.addEventListener("mousemove",function(a){d(a.pageX,a.pageY)});window.addEventListener("mousewheel",function(a){if(a.shiftKey){a.preventDefault();var c=a.wheelDeltaY;b+=-c;b=0<c?Math.max(90,b):Math.min(b,window.innerHeight/2);d(a.pageX,a.pageY)}})})();
// Or paste this in the console and mouse over the page.
// SHIFT+mousewheel scroll makes the circle bigger/smaller.
(function() {
var radius = 90; // px
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
echo "What is the url (e.g."
read inputline
You can’t perform that action at this time.