Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
sudo apt-get update | |
sudo apt-get install libssl-dev | |
sudo apt-get install g++ | |
wget http://nodejs.org/dist/node-v0.3.1.tar.gz | |
tar -xvf node-v0.3.1.tar.gz | |
cd node-v0.3.1 | |
./configure | |
make | |
sudo make install | |
cd ~ |
module.exports = TwoStep; | |
var slice = Array.prototype.slice; | |
function Group(callback) { | |
this.args = [null]; | |
this.left = 0; | |
this.callback = callback; | |
this.isDone = false; | |
} |
var http = require('http'); | |
var server = http.createServer(function(req, res) { | |
// console.log(req); // debug dump the request | |
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object) | |
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64 | |
console.log("Authorization Header is: ", auth); |
%% @doc Uses SAX to convert an XML document into a simple nested-tuple | |
%% structure. Ignores namespaces. | |
-module(xmlsimple). | |
-export([file/1, | |
string/1, | |
emit/1, | |
emit_file/2]). | |
-include_lib("xmerl/include/xmerl.hrl"). |
If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.
If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.