Skip to content

Instantly share code, notes, and snippets.

View kevinolsen's full-sized avatar

Kevin Olsen kevinolsen

  • Pivotal Labs
  • Boulder CO
View GitHub Profile
kevins-macbook:basic kevinolsen$ npm -s config get root
/Users/kevinolsen/.nvm/v0.2.6/lib/node
kevins-macbook:basic kevinolsen$ echo $NODE_PATH
/Users/kevinolsen/.nvm/v0.2.6/lib/node
@kevinolsen
kevinolsen / gist:852417
Created March 3, 2011 06:13
new environment debugging
kevins-macbook:basic kevinolsen$ node -v
v0.2.6
kevins-macbook:basic kevinolsen$ which node
/Users/kevinolsen/.nvm/v0.2.6/bin/node
kevins-macbook:basic kevinolsen$ npm ls installed
npm info it worked if it ends with ok
npm info using npm@0.2.18
npm info using node@v0.2.6
connect@0.5.10 =creationix =tjholowaychuk active installed remote High performance middleware framework framework web middleware connect rack
express@1.0.8 =tjholowaychuk active installed latest remote Sinatra inspired web development framework framework sinatra web rest restful
@kevinolsen
kevinolsen / gist:845908
Created February 27, 2011 04:41
conway idea
require 'test/unit'
class Conway
def self.map_new_world(world)
interstitial_world = {}
world.each do |location|
(location[0]-1).upto(location[0]+1) do |x|
(location[1]-1).upto(location[1]+1) do |y|
interstitial_world[[x, y]] ||= {}
interstitial_world[[x, y]][:alive] = true and next if location[0] == x and location[1] == y