Skip to content

Instantly share code, notes, and snippets.

View jwilkins's full-sized avatar

Jonathan Wilkins jwilkins

  • San Francisco, CA
View GitHub Profile
@jwilkins
jwilkins / gist:1281976
Created October 12, 2011 17:52
dsocks osx
svn checkout http://dsocks.googlecode.com/svn/trunk/ dsocks
cd dsocks
bsdmake && sudo bsdmake install
cp dsocks.sh ~/bin/dsocks
@jwilkins
jwilkins / gist:1275507
Created October 10, 2011 14:50
clone/copy remote drives
ssh user@host "tar -zc --one-file-system -f - /" > host-partition-date.tar.gz
ssh user@host "dd if=/dev/sda | bzip2" > host-sda.dd.bz2
# http://cb.vu/unixtoolbox.xhtml
server# dd if=/dev/da0 | nc -l 4444 # Server partition image
client# nc 192.168.1.1 4444 | dd of=/dev/da0 # Pull partition to clone
client# nc 192.168.1.1 4444 | dd of=da0.img # Pull partition to file
@jwilkins
jwilkins / node_rlwrap
Created October 9, 2011 21:20
rlwrap for node
#http://blog.doteight.com/2011/01/16/rlwrap-and-node.html
#http://utopia.knoware.nl/~hlub/rlwrap/rlwrap.html
alias node='env NODE_NO_READLINE=1 rlwrap -p Green -S "node >>> " node'
@jwilkins
jwilkins / osx-ruby-editline-to-readline.sh
Created September 30, 2011 09:18
True Readline for Ruby 1.8.7-p174 on OS X 10.6 using Homebrew
# http://andre.arko.net/2011/05/26/add-true-readline-to-ruby-on-os-x-1067/
# Install readline
brew install readline
# Download the readline extension
cd /tmp
svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_174/ext/readline/
# Compile the bundle against homebrewed readline
make readline.o CFLAGS=‘-I/usr/local/Cellar/readline/6.1/include -DHAVE_RL_USERNAME_COMPLETION_FUNCTION’