Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Swasey mig

View GitHub Profile
View keybase.md

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
crosh prefs
View crosh-prefs.js
// 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 Oct 23, 2014
arch linux install for vmware
View install.sh
# 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 Jun 3, 2014
Benchmark initializer load time
View initializable.rb
# 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 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
@mig
mig / gnome-reset.sh
Created Jul 10, 2013
Reset Gnome 3 config to default
View gnome-reset.sh
rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*
@mig
mig / RESCUE.md
Created Jul 10, 2013
Notes on recovering my arch install
View RESCUE.md
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"
View 1.9.3-p448
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"
View 1.9.3-dtrace
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
View 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.

You can’t perform that action at this time.