Skip to content

Instantly share code, notes, and snippets.

View palanik's full-sized avatar

Palani Kumanan palanik

View GitHub Profile
@palanik
palanik / server.js
Created June 6, 2016 02:54
Using D3 on node.js
/*
* npm install d3 node-jsdom
*/
var d3 = require('d3');
var jsdom = require('node-jsdom');
var http = require('http');
function svgDOM(width, height) {
// Setup DOM
@palanik
palanik / lodash_helper.js
Created April 16, 2016 20:06
Handlebar.js generic lodash helper
Handlebars.registerHelper("_", function() {
var options = [].pop.call(arguments);
var func = [].shift.call(arguments);
return _[func].apply(_, arguments);
});
// Usage:
{{_ 'functionName' arg1 arg2 argn}}
// Example - _.round() → 4.01