Install nodejs

Here is how I install nodejs to get access to cool tools like “tldr” (a summarized version of the typical man pages) and “ungit” (an interface to Git to ease people into using it).

Run these two commands to get nodejs:

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

sudo apt-get install -y nodejs

then you can install ungit, tldr, whatever you want.

sudo npm install -g tldr

These commands work with Linux Mint 17 (or Ubuntu 14.04).

Docker image to run a quick PHP test server

I had a need to run a PHP-capable web server on my Vagrant box to locally test some Javascript that queried a database via PHP, and then presented that via Google Charts.  This Docker image suited that use case just fine.  Replace as appropriate:

sudo docker run --name web-server -p 127.0.0.1:80:80 -v /opt/mysql:/var/lib/mysql -v <full path to location you want as root>:/web -d osws/php-web-server