Skip to content

Instantly share code, notes, and snippets.

View jackpooley's full-sized avatar

Jack Pooley jackpooley

View GitHub Profile
@jackpooley
jackpooley / keybase.md
Created August 12, 2015 16:00
Keybase

Keybase proof

I hereby claim:

  • I am jackpooley on github.
  • I am jackpooley (https://keybase.io/jackpooley) on keybase.
  • I have a public key whose fingerprint is A67D 81B8 68B7 DD85 011A D177 3D16 8398 8569 8438

To claim this, I am signing this object:

@jackpooley
jackpooley / serve_python.sh
Created May 14, 2013 14:26
Serve current directory in Python.
#!/usr/bin/env sh
sudo python -m SimpleHTTPServer 80
@jackpooley
jackpooley / serve.sh
Last active December 17, 2015 07:58
Serve current directory in with ruby.
#!/usr/bin/env sh
sudo ruby -rwebrick -e "w = WEBrick::HTTPServer.new(:Port => 80, :DocumentRoot => Dir.pwd); %w(TERM INT).each {|s| trap(s) {w.shutdown}};w.start"
@jackpooley
jackpooley / force_disable_hibernate_mode.sh
Last active December 10, 2015 21:18
After Firmware update MBP hibernate mode is automatically set to 3 on shutdown (ignores 'sudo pmset -a hibernatemode 0' command).
#!/usr/bin/env bash
#
# force_disable_hibernate_mode.sh
#
# More Info: https://discussions.apple.com/thread/4492672?start=0&tstart=0
#
# First, disable hibernation mode:
sudo pmset -a hibernatemode 0
@jackpooley
jackpooley / install-osxmonad.sh
Created November 25, 2012 03:01
How to install osxmonad w/ out darcs
# install osxmonad
# uninstall old
ghc-pkg unregister osxmonad
ghc-pkg unregister xmonad
# download new
git clone https://github.com/xmonad/xmonad
git clone https://github.com/xmonad/osxmonad.git
@jackpooley
jackpooley / cabal-install-darcs
Created November 25, 2012 00:40
Cabal won't install Darcs on homebrew installed haskell-platform (Running Mountain Lion)
~ ❯❯❯ cabal install darcs ⏎
Resolving dependencies...
In order, the following would be installed:
dataenc-0.14.0.4 (reinstall) changes: base-4.5.1.0 added
mmap-0.5.8 (reinstall) changes: base-4.5.1.0 added
hashed-storage-0.5.10 (reinstall) changes: base-4.5.1.0 added,
directory-1.1.0.2 added
regex-base-0.93.2 (reinstall) changes: base-4.5.1.0 added
regex-posix-0.95.2 (reinstall) changes: base-4.5.1.0 added
regex-compat-0.95.1 (reinstall) changes: base-4.5.1.0 added
~/D/P/W/W/c/C/u/r/r/balder git:master ❯❯❯ rails ✱ ◼
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
~/D/P/W/W/c/C/u/r/r/balder git:master ❯❯❯ which rails ✱ ◼
/usr/bin/rails
~/D/P/W/W/c/C/u/r/r/balder git:master ❯❯❯ gem which rails ✱ ◼
/Users/jack/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails.rb
@jackpooley
jackpooley / rmate
Created December 13, 2011 16:07
rmate script from TextMate 2 (included in the alpha release, under preferences/terminal)
#!/usr/bin/env ruby
# encoding: UTF-8
$VERBOSE = true # -w
$KCODE = "U" if RUBY_VERSION < "1.9" # -KU
require 'optparse'
require 'socket'
require 'fileutils'