Skip to content

Instantly share code, notes, and snippets.

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

hello markdown

@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 / 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 / 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 / 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 / .gitignore
Last active January 9, 2016 21:04
Gulp Template
node_modules
sass
templates
@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 / .block
Last active October 29, 2016 00:47 — forked from jcnesci/.block
Stacked Barchart with Transitions
license: mit
@dnprock
dnprock / README.md
Last active April 10, 2017 20:52
Force Layout with auto zoom (canvas)

Document Template for vida.io

Github template for vida.io

Node and gulp are required. To run, use command: gulp

Access through browser at http://localhost:5000.

Describe your document in manifest.json. Format is as follows:

@dnprock
dnprock / README.md
Last active April 10, 2017 20:53
Force Layout with auto zoom (SVG)

Document Template for vida.io

Github template for vida.io

Node and gulp are required. To run, use command: gulp

Access through browser at http://localhost:5000.

Describe your document in manifest.json. Format is as follows: