Skip to content

Instantly share code, notes, and snippets.

View pje's full-sized avatar
🦥

Patrick Ellis pje

🦥
  • Brooklyn
  • 11:48 (UTC -04:00)
View GitHub Profile
@pje
pje / hash_utils.rb
Created September 22, 2012 15:49
HashUtils
module HashUtils
def self.recursive_symbolize_keys(h)
case h
when Hash
Hash[
h.map do |k, v|
[ k.respond_to?(:to_sym) ? k.to_sym : k, recursive_symbolize_keys(v) ]
end
]
when Enumerable
@pje
pje / the_critical_engineer.sh
Created September 20, 2012 22:06
the_critical_engineer.sh
#!/usr/bin/env bash
echo $(curl http://criticalengine.weise7.org) | ack '(1\..*10\..*)</pre>' --output '$1' | say -v Alex -o ~/Desktop/the_critical_engineer.aiff
@pje
pje / g.sh
Created August 21, 2012 13:44 — forked from hannestyden/gist:3415541
g: a function that will often save you at least two characters
function g() {
if [[ $# -eq 0 ]] ; then
git status
else
git $@
fi
}
@pje
pje / README.md
Created June 21, 2012 09:38
RVM Hell

I am in the deepest level of RVM Hell (a sublevel of the deepest level of Xcode Hell, which itself is the deepest level of Apple Hell (flowchart to follow)). This is how I ended up there, and what I was told along the way.

# via fresh rvm installation
rvm pkg install zlib

set -x
CC=/usr/bin/gcc-4.2 rvm --trace reinstall 1.9.3 --with-gcc=/usr/bin/gcc-4.2 --with-zlib-dir=$rvm_path/usr
set +x