Skip to content

Instantly share code, notes, and snippets.

View strangnet's full-sized avatar
🐶
dogwned

Patrick Strang strangnet

🐶
dogwned
View GitHub Profile
@strangnet
strangnet / gist:5053050
Created February 28, 2013 00:01
ruby 2 rails 4 install with homebrew
brew install openssl
brew install ruby-build
brew install rbenv
export CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`"
rbenv install 2.0.0-p0
rbenv rehash
rbenv global 2.0.0-p0
gem install bundler
gem install rails -v 4.0.0.beta1 --no-ri --no-rdoc
rbenv rehash
@strangnet
strangnet / setup.txt
Created September 21, 2012 09:01
Setting up work computer (OS X)
Install Xcode from App Store
- install command line tools from Xcode preferences
Get homebrew: ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
- brew doctor
brew install hg
brew install git
brew install nodejs
brew install rbenv
brew install ruby-build
@strangnet
strangnet / netstat_loop.rb
Created July 12, 2012 15:59
Netstat loop to log the udp out to port 1
#!/bin/ruby
while (true)
f = IO.popen('netstat -anp udp')
found = false
while (line = f.gets)
linesplit = line.split
if (/udp/ =~ linesplit[0])
local = linesplit[3]
foreign = linesplit[4]