I hereby claim:
- I am thomblake on github.
- I am thomblake (https://keybase.io/thomblake) on keybase.
- I have a public key whose fingerprint is E766 FE1F 6C93 81E5 5B08 D875 4193 DABC 127E 7585
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
for i in `git ls-tree -r master --name-only`; do [[ -n $(git blame $i | grep 'TJ Koblentz') ]] && echo $i; git blame $i | grep 'TJ Koblentz'; done | less -S |
var a = foo() | |
+b |
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(8080, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:8080/'); |
Inspired by A better coding convention for lists and object literals in Javascript and npm style.
With help from Cheeso on StackOverflow and Mihai Bazon
A new emacs mode-combo for npm style.
EDIT : implemented here: https://github.com/thomblake/js-mode
// Showing how errors pop out in my js-mode standard indenting: | |
// (https://github.com/thomblake/js-mode) | |
// (courtesy of https://gist.github.com/357981 for the excellent examples) | |
// error in standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog" | |
e = "elf", |
//an alternate comma-first style soon to be supported by my js-mode | |
//The assumption is that you will consistently not put the first item in the | |
//list on the same line as the brace, and then want the commas / operators | |
//2 spaces back from there. | |
//normal cases: | |
var test = { | |
prop1: "value1" |
;;;This gist refers to the problem referenced at http://www.perlmonks.org/?node_id=369247 | |
;;;written in lispy format for clarity; the following is not necessarily valid lisp | |
;;;m is a variable currently equal to 20 | |
;;;expression to be evaluated: (++m + m++) | |
;;;pretend pre-increment and post-increment exist in lisp - then, this is the expression: | |
(+ (++m) (m++)) ; m = 20 | |
;;; `preincrement' increments the variable and returns the variable | |
(+ m (m++)) ; m = 21 | |
;;; the following line is the magic - replace `postincrement' with `increment, then return original value' |