-
4 space indentation
-
80 character max per line
-
if's always have space before braces
-
if's always have braces
if () { return; }
-
exception:
if (err) throw err;
This file contains hidden or 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
var Seq = require('seq') | |
, data = ['a', 'b', 'c'] | |
function incr(x, cb) { | |
cb(null, ++x) | |
} | |
function get(x, cb) { | |
if (x == 'all') cb(null, data) | |
else if (!data[x]) cb("data["+x+"] doesn't exist") |
This file contains hidden or 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
var chain = require('seq')() | |
for (var i=0; i<3; i++) { | |
chain.seq(function(){ | |
console.log(i) // prints 3 .. wtf?! | |
}) | |
} |
This file contains hidden or 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
var data = ['a', 'b', 'c'] | |
function get(x, cb) { | |
if (x == 'all') cb(null, data) | |
else if (!data[x]) cb("data["+x+"] doesn't exist") | |
else cb(null, data[x]) | |
} | |
require('step')( | |
function(){ |
This file contains hidden or 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
<html> | |
<head></head> | |
<body> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<script> | |
var arr = { | |
str1 : 'test' | |
, str2 :'test2' | |
, array1 : ['12','13','14'] |
This file contains hidden or 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
#!/bin/sh | |
echo | |
echo "**** Pushing changes to github" | |
echo | |
git push master github | |
exec git-update-server-info |
Unhosted is an approach to break the one-to-one link between software publisher and hostage-providers by separating the source-code (client-side, hosted by anyone anywhere) from the data (persistent storage preferably owned by the user of the webapp).
A module is a software which provides a client-side interface to communicate
This file contains hidden or 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
// | |
// this is about parsing-performance of xml/html-parsers | |
// to be more precisely, i just want to look for specific nodes/attributes | |
// | |
// i am testing | |
// | |
// * (htmlparser)[https://github.com/tautologistics/node-htmlparser] | |
// * (html5)[https://github.com/aredridel/html5] | |
// * (sax)[https://github.com/isaacs/sax-js] | |
// * (jsdom)[https://github.com/tmpvar/jsdom] + sizzle/jquery |
This file contains hidden or 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
// | |
// CouchEmitter | |
// | |
// this will listen for _changes of a given couchdb | |
// idea is shameless stolen from | |
// https://github.com/mikeal/dbemitter/blob/master/main.js | |
(function(exports, $, EventEmitter, undefined){ | |
exports.CouchEmitter = CouchEmitter |
This file contains hidden or 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
From c7fb65e6b9abb2650630a2e5744a431c50949180 Mon Sep 17 00:00:00 2001 | |
From: Patrick Pfeiffer <[email protected]> | |
Date: Wed, 9 Feb 2011 18:35:19 +0100 | |
Subject: [PATCH] Update link to Redis Command Reference. | |
--- | |
README.md | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/README.md b/README.md |