Skip to content

Instantly share code, notes, and snippets.

@jdx
jdx / boot.js
Last active March 16, 2023 18:08
zero-downtime node.js app runner
// This script will boot app.js with the number of workers
// specified in WORKER_COUNT.
//
// The master will respond to SIGHUP, which will trigger
// restarting all the workers and reloading the app.
var cluster = require('cluster');
var workerCount = process.env.WORKER_COUNT || 2;
// Defines what each worker needs to run
@bobmonteverde
bobmonteverde / d3.css
Created March 18, 2012 09:18
A Simple D3 Line chart with Legend and Tooltips
/********************
* TOOLTIP CSS
*/
.nvtooltip {
position: absolute;
background-color: rgba(255,255,255,1);
padding: 10px;
border: 1px solid #ddd;