This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [email protected] | |
npm info using [email protected] | |
[email protected] =creationix =tjholowaychuk active installed remote High performance middleware framework framework web middleware connect rack | |
[email protected] =tjholowaychuk active installed latest remote Sinatra inspired web development framework framework sinatra web rest restful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |