Skip to content

Instantly share code, notes, and snippets.

avibryant / loess.js
Created Aug 17, 2011
Loess smoothing
View loess.js
//adapted from the LoessInterpolator in org.apache.commons.math
function loess_pairs(pairs, bandwidth)
var xval ={return pair[0]});
var yval ={return pair[1]});
var res = loess(xval, yval, bandwidth);
return,i){return [x, res[i]]});
mbostock /
Last active Nov 10, 2021
Underscore’s Equivalents in D3



Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
mbostock / .block
Last active Jun 17, 2017
View .block
license: gpl-3.0
mbostock / .block
Last active Sep 3, 2017
Concurrent Transitions
View .block
license: gpl-3.0
biovisualize / index.html
Last active Oct 15, 2018
D3.js Reusable Bar Chart with Angularjs
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
body {
font: 14px sans-serif;
.axis path, .axis line {
fill: none;
mbostock / .block
Last active Sep 12, 2018
TopoJSON Parallax
View .block
license: gpl-3.0
dypsilon /
Last active Dec 2, 2021
A badass list of frontend development resources I collected over time.
mbostock / .block
Last active Dec 9, 2016
Dispatching Events
View .block
license: gpl-3.0
lelandbatey /
Last active Nov 27, 2021
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


soheilhy /
Last active Dec 6, 2021
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers