Skip to content

Instantly share code, notes, and snippets.


Matthew Swasey mig

  • LivingSocial
  • Washington DC
View GitHub Profile
mig / 0_reuse_code.js
Created Jan 14, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Ruby 1.9.3-p194 with DTrace probes, Perf Patches, and backported COW-friendly GC


This script installs a patched version of ruby 1.9.3-p194 with DTrace probes, boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches and to Aaron Patterson for the DTrace instrumentation.

View spellcheck.rb
# encoding: UTF-8
# Spell check plugin for earthquake.gem
# written by Smile @rT,,
# 1. Resolve dependencies of raspell.gem:
View rails_template.rb
# mig_rails_template.rb
file 'config/routes.rb', <<-CODE
ActionController::Routing::Routes.draw do |map|
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/favicon.ico"
View mocha_stub_path.rb
module Mocha
module ObjectMethods
def stub_path(path)
path = path.split('.') if path.is_a? String
raise "Invalid Argument" if path.empty?
part = path.shift
mock = Mocha::Mockery.instance.named_mock(part)
exp = self.stubs(part)
if path.length > 0
mig / build-emacs-fedora10.rb
Created Dec 24, 2008 — forked from wfarr/build-emacs-osx.rb
build and install osx emacs from source
View build-emacs-fedora10.rb
#!/bin/env ruby
require 'fileutils'
config_opts = ["--with-jpeg=no", "--with-gif=no", "--with-tiff=no", "--with-ns"]
source_dir = "#{ENV['HOME']}/src"
repo_dir = "#{source_dir}/emacs"
#install_dir = "#{repo_dir}/nextstep/"
#install_target = "/Applications/"