Skip to content

Instantly share code, notes, and snippets.

@dnprock
dnprock / README.md
Last active February 12, 2016 01:57 — forked from CodeXmonk/README.md
Simple modification based on mbostock's Bullet Charts.

There is an other, newer variant with Miso Project's d3.chart.js and with a little bit of more serious explanation. That chart can be found here on bl.ocks.org.

Just an idea...

( feedback is welcomed: @CodeXmonk )

Simple modification based on mbostock's Bullet Charts.

@dnprock
dnprock / .gitignore
Last active January 9, 2016 21:04
Gulp Template
node_modules
sass
templates
@dnprock
dnprock / vida_d3.js
Created October 23, 2013 23:37
vida.io script attach to d3 components, call vida_d3.attach and detach.
var orig_appendChild = Element.prototype.appendChild;
var inspect_rect = null;
vida_d3 = {
getCallStack: function() {
var fn = arguments.callee;
var callstack = []
while ( (fn = fn.caller) ) {
callstack.push(fn.toString())
}
@dnprock
dnprock / extract_users.js
Last active December 24, 2015 16:39
Export meteor mongodb users to CSV format. Useful for email marketing.
// # get mongo temp URL
// meteor mongo --url my_app
// # dump data from mongo
// mongodump -u client -h [production_url_with_port] -d my_app -p [password_hash]
// # run your mongo server
// mongod --dbpath ./my_app_data
// # restore data
// mongorestore --db dump/my_app
// # export data to CSV
// mongo my_app extract_users.js
@dnprock
dnprock / client_config.js
Created September 24, 2013 18:53
Different configs for meteor dev/staging/production environments.
getS3Bucket = function() {
var host = document.location.host;
if (host === 'localhost:3000') {
return 'myapp-dev';
} else if (host === 'myapp.meteor.com') {
return 'myapp-staging';
} else if (host === 'myapp.com') {
return 'myapp-production';
}
}
@dnprock
dnprock / README.md
Created August 27, 2013 23:40 — forked from mbostock/.block

A box-and-whisker plot uses simple glyphs that summarize a quantitative distribution with five standard statistics: the smallest value, lower quartile, median, upper quartile, and largest value. This summary approach allows the viewer to easily recognize differences between distributions. Data from the Michelson–Morley experiment. Implementation contributed by Jason Davies. This example periodically randomizes the values to demonstrate transitions.

@dnprock
dnprock / README.md
Created September 11, 2015 19:37
fresh block

hello markdown

@dnprock
dnprock / README.md
Last active September 10, 2015 22:51 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@dnprock
dnprock / index.html
Last active August 29, 2015 14:24
Multiple CSVs
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
position: relative;
}
</style>
@dnprock
dnprock / index.html
Last active August 29, 2015 14:23
US States Map - Side by Side
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 1100px;
height: 500px;
position: relative;
}