Skip to content

Instantly share code, notes, and snippets.

View mig's full-sized avatar

Matthew Swasey mig

  • LivingSocial
  • Washington DC
View GitHub Profile
@mig
mig / 0_reuse_code.js
Created January 14, 2014 23:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mig
mig / 0-readme.md
Last active December 17, 2015 20:59 — forked from burke/0-readme.md

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

Overview

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.

# encoding: UTF-8
# Spell check plugin for earthquake.gem
#
# written by Smile @rT, https://github.com/smileart, smileart@mail.ru
#
# INSTALL:
#
# 1. Resolve dependencies of raspell.gem:
# https://github.com/evan/raspell/blob/master/README.rdoc
#
# mig_rails_template.rb
file 'config/routes.rb', <<-CODE
ActionController::Routing::Routes.draw do |map|
end
CODE
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/favicon.ico"
@mig
mig / mocha_stub_path.rb
Created January 21, 2009 15:51 — forked from kommen/mocha_stub_path.rb
Mocha stub_path
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
exp.returns(mock)
@mig
mig / build-emacs-fedora10.rb
Created December 24, 2008 05:05 — forked from wfarr/build-emacs-osx.rb
build and install osx emacs from source
#!/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/Emacs.app"
#install_target = "/Applications/Emacs.app"