Skip to content

Instantly share code, notes, and snippets.

View mig's full-sized avatar

Matthew Swasey mig

  • LivingSocial
  • Washington DC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mig on github.
  • I am mswasey (https://keybase.io/mswasey) on keybase.
  • I have a public key ASC48-Jep3Y05Cl3dKUxgu9lCfcYeMDFE1mSH_pXiowp4Ao

To claim this, I am signing this object:

@mig
mig / crosh-prefs.js
Last active May 31, 2017 18:33
crosh prefs
// from http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/doc/faq.txt
// and http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/js/hterm_preference_manager.js
term_.prefs_.set('audible-bell-sound', '');
term_.prefs_.set('font-size', 17);
term_.prefs_.set('font-smoothing', 'subpixel-antialias');
var fonts=term_.prefs_.get('font-family');
term_.prefs_.set('font-family', '"Droid Sans Mono", '.concat(fonts));
term_.prefs_.set('cursor-blink', true);
term_.prefs_.set('environment', {TERM: 'xterm-256color'});
@mig
mig / install.sh
Created October 23, 2014 16:24
arch linux install for vmware
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
# make filesystems
# /boot
mkfs.ext2 /dev/sda1
# /
mkfs.btrfs /dev/sda2
@mig
mig / initializable.rb
Created June 3, 2014 20:21
Benchmark initializer load time
# place in railties/lib/rails/initializable.rb
def run_initializers(group=:default, *args)
return if instance_variable_defined?(:@ran)
t0 = Time.now
initializers.tsort.each do |initializer|
t = Time.now
initializer.run(*args) if initializer.belongs_to?(group)
puts("%60s: %.3f sec" % [initializer.name, Time.now - t])
end
@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 / gnome-reset.sh
Created July 10, 2013 17:07
Reset Gnome 3 config to default
rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*
@mig
mig / RESCUE.md
Created July 10, 2013 15:41
Notes on recovering my arch install
cryptsetup luksOpen /dev/sda3 root
mount /dev/mapper/root /mnt
mount /dev/sda1 /mnt/boot/efi
efibootmgr -c -w -d /dev/sda -p Y -l '\EFI\gummiboot\gummiboot.efi' -L "Gummiboot"
@mig
mig / 1.9.3-p448
Last active December 19, 2015 11:49
build_package_with_readline_and_openssl () {
local package_name="$1"
{
autoconf
./configure --prefix="$PREFIX_PATH" --with-opt-dir="$PREFIX_PATH:`brew --prefix readline`:`brew --prefix openssl`" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
}
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_git "1.9.3-dtrace" "https://github.com/mig/ruby.git" "1.9.3-dtrace" autoconf standard
@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.