Install Node.js from Git repository and NPM on  Ubuntu.

Make sure you have the necessary software

sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev g++

Install Node.js

git clone https://github.com/joyent/node.git
cd node
git tag (list released versions and select the version you want)
git checkout v0.10.26
./configure
make
sudo make install
node -v (check that node is installed correctly and version matches your choice)

Install NPM

curl -O -L https://npmjs.org/install.sh | sudo sh
npm -v (check that NPM is installed correctly)

Grab a coffee, you’re done.

I’ve been using the linux command line for enabling or disabling an ethernet interface for so long now, I’m having trouble remembering the difference on Mac OS X. Linux is handled as follows:

sudo ifup eth0
sudo ifdown eth0

The Mac OS X equivalent of this is:

sudo ifconfig en0 up
sudo ifconfig en0 down

For some reason I’m having a difficult time remembering how to switch virtual terminals when running Ubuntu under VirtualBox on Mac OS X (probably due to how infrequently I need to run this). The shortcut key sequence is:

fn + option + F2

Note on some MacBook Pro’s fn + command (host key) + F2 also works

Generate a key on your local machine

ssh-keygen -t dsa

or

ssh-keygen -t rsa -b 4096

hit enter at the prompts and specifying a strong password

Copy the key to a remote machine

cat .ssh/id_dsa.pub | ssh username@hostname 'cat >> .ssh/authorized_keys'

or

cat .ssh/id_rsa.pub | ssh username@hostname 'cat >> .ssh/authorized_keys'

This should work whether you’re using Cygwin on Windows, Mac OS X, or some flavor of Linux

As a web developer it’s often handy to be able to actually see all the unix related filesystem folder’s from within Finder. By default these are not displayed as a feature of the OS, but it’s quick and easy to turn this feature off to see all folders on the hard drive in Finder. to do so open terminal and enter the following:

defaults write com.apple.Finder AppleShowAllFiles YES

Unfortunately, there’s still one more step to actually allow the setting change to take effect. You know have to “relaunch” Finder. This is done by pressing the “option” key while clicking on the Finder icon in the dock. Doing so will provide an extra option to relaunch Finder.

That’s it! Oh, and if you want to go back to the way it was before simply change the “YES” in the command above to a “NO” and relaunch Finder again.

Note: Mavericks requires a lowercase f in “finder”:

defaults write com.apple.finder AppleShowAllFiles YES