gists for a blog post
This file contains 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
38 38 40 40 37 39 37 39 66 65 13 | |
cu cu cd cd cl cr cl cr b a en |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
server.route({ | |
method: "GET", | |
path: "/events", | |
handler: onEventsRequest | |
}) |
This file contains 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 creds = appEnv.getServiceCreds(/foo/) | |
if (creds) { | |
doSomethingWith(creds.blah) | |
} |
This file contains 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
function diskToC(id) { | |
//for each EML file we find | |
var file = id + ".eml" | |
var parser = new MailParser() | |
parser.on("end", onParserEnd) | |
fs.createReadStream(file).pipe(parser) | |
//------------------------------------ |
This file contains 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
[ | |
{ | |
"id": "21109fb8.deef6", | |
"type": "http in", | |
"name": "", | |
"url": "/", | |
"method": "get", | |
"x": 124, | |
"y": 60, | |
"z": "4552fd9f.baad04", |
This file contains 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 fs = require("fs") | |
fs.readFile(__filename, {encoding:"utf8"}, function(err, content){ | |
if (err) throw err | |
removeBraces(content, function(err, fixedContent){ | |
if (err) throw err | |
writeContent(fixedContent, function(err){ | |
if (err) throw err |
This file contains 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 coffee = require("coffee-script") | |
var x = cson` | |
a: 1 | |
b: 2 | |
` | |
console.log(x) | |
// prints: { a: 1, b: 2 } | |
console.log(cson` |
This file contains 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
// es6 template strings for APL | |
// npm install apl | |
"use strict" | |
// from: https://github.com/ngn/apl/blob/master/examples/1-mult.apl | |
// note: http://s.mlkshk-cdn.com/r/97VP | |
apl` | |
⍝ Multiplication table |