Skip to content

Instantly share code, notes, and snippets.

View terbo's full-sized avatar
💭
everybody must get annointed

CB terbo

💭
everybody must get annointed
View GitHub Profile
@mbostock
mbostock / .block
Last active September 11, 2024 10:57
Maze Tree
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 30, 2024 00:26
Randomized Depth-First III
license: gpl-3.0
@mbostock
mbostock / .block
Last active November 26, 2016 01:35
Prim’s Algorithm II
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 30, 2025 09:58
Phyllotaxis
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 2, 2020 17:20
OMG Particles II
license: gpl-3.0
@d3noob
d3noob / .block
Last active January 21, 2020 23:56
Map using leaflet.js and d3,js overlaid
license: mit
@mbostock
mbostock / .block
Last active November 26, 2016 01:37
Rotating Icosahedron
license: gpl-3.0
@joeyAghion
joeyAghion / mongodb_collection_sizes.js
Last active February 25, 2025 16:33
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
stats = stats.sort(function(a, b) { return b['size'] - a['size']; });
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); }
@mbostock
mbostock / .block
Last active April 2, 2018 18:47
Drag Slider
license: gpl-3.0
@caged
caged / d3-server.js
Last active October 17, 2023 04:05
Directly render and serve d3 visualizations from a nodejs server.
// Start `node d3-server.js`
// Then visit http://localhost:1337/
//
var d3 = require('d3'),
http = require('http')
http.createServer(function (req, res) {
// Chrome automatically sends a requests for favicons
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
// fixed or this is a regression.