As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update configdocs for npm 8+
- Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for --access=public
- Sep 07, 2020 update docs for npm version
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh | 
| //Wait for relevant code bits to load before starting any tests | |
| define(['core.js'], function( core ) { | |
| module("Core Tests"); | |
| test("Test core methods", function(){ | |
| expect(2); | |
| equals( 1, 1, "A trivial test"); | |
| ok( true, "Another trivial test"); | |
| }); | 
| /*! | |
| * Small Walker - v0.1.1 - 5/5/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ | |
| // Walk the DOM, depth-first (HTML order). Inside the callback, `this` is the | 
| curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
| echo "source ~/.git-completion.bash" >> ~/.bash_profile | 
| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); | 
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # hubot | |
| description "Hubot Campfire bot" | |
| author "David Wittman <[email protected]>" | |
| start on filesystem or runlevel [2345] | |
| stop on runlevel [!2345] | |
| # Path to Hubot installation | |
| env HUBOT_DIR='/opt/hubot/' | 
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| var app = require('express').createServer() | |
| var io = require('socket.io').listen(app); | |
| var fs = require('fs'); | |
| app.listen(8008); | |
| // routing | |
| app.get('/', function (req, res) { | |
| res.sendfile(__dirname + '/chat.html'); | |
| }); |