Skip to content

Instantly share code, notes, and snippets.

View LuiSlacker's full-sized avatar

Petulant Slacker LuiSlacker

View GitHub Profile
@yonester
yonester / example.js
Last active November 4, 2016 15:05
Can we interpolate "transform" in jsdom?
var jsdom = require('jsdom'),
d3 = require('d3');
var document = jsdom.jsdom();
var rect = d3.select(document.body).append('svg').append('rect');
// This works...
rect
.attr('width', 0)
@justmoon
justmoon / custom-error.js
Last active April 14, 2024 14:27 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@staltz
staltz / introrx.md
Last active April 15, 2024 10:24
The introduction to Reactive Programming you've been missing