Skip to content

Instantly share code, notes, and snippets.

View stormpython's full-sized avatar

Shelby Sturgis stormpython

  • Netflix
  • San Francisco, CA
View GitHub Profile
'use strict';
// modules
import React from 'react';
import ReactDOM from 'react-dom';
import d3 from 'd3';
import { isNaN } from 'lodash';
import pointsLayout from '../layout/symbols';
@stormpython
stormpython / README.md
Last active May 4, 2016 11:14
D3 Directives in Angular
@stormpython
stormpython / https.js
Created January 19, 2016 01:38
HTTP Proxy Example using https-proxy-agent
const { fromNode: fn } = require('bluebird');
const { createWriteStream, unlinkSync } = require('fs');
const Wreck = require('wreck');
const HttpsProxyAgent = require('https-proxy-agent');
const getProgressReporter = require('../progress_reporter');
function sendRequest({ sourceUrl, timeout, proxy }) {
const maxRedirects = 11; //Because this one goes to 11.
sourceUrl = proxy ? sourceUrl.agent = new HttpsProxyAgent(proxy) : sourceUrl;
@stormpython
stormpython / index.html
Created November 14, 2015 08:30
Bullet Chart
<div id="bullet">
<svg width=600 height=500></svg>
</div>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
@stormpython
stormpython / countries.json
Last active November 13, 2015 18:49
European Life Expectancy
[
{ "abbr": "ad", "name": "Andorra", "leb": 84.2, "pop": 79200, "size": 468 },
{ "abbr": "al", "name": "Albania", "leb": 74, "pop": 2887000, "size": 28748 },
{ "abbr": "at", "name": "Austria", "leb": 81.5, "pop": 8608000, "size": 83858 },
{ "abbr": "ba", "name": "Bosnia and Herzegovina", "leb": 76, "pop": 3750000, "size": 51129 },
{ "abbr": "be", "name": "Belgium", "leb": 81, "pop": 11259000, "size": 30510 },
{ "abbr": "bg", "name": "Bulgaria", "leb": 74.5, "pop": 7265000, "size": 110910 },
{ "abbr": "by", "name": "Belaurs", "leb": 72.5, "pop": 9481000, "size": 207600 },
{ "abbr": "ch", "name": "Switzerland", "leb": 82.8, "pop": 8081000, "size": 41290 },
{ "abbr": "cy", "name": "Cyprus", "leb": 81.2, "pop": 876000, "size": 9251 },
@stormpython
stormpython / Rows, Columns, Grid Layout Example.markdown
Created November 10, 2015 18:01
Rows, Columns, Grid Layout Example
@stormpython
stormpython / Rows, Columns, Grid Layout Example.markdown
Created November 9, 2015 22:35
Rows, Columns, Grid Layout Example
@stormpython
stormpython / readme.md
Last active September 18, 2015 17:26 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@stormpython
stormpython / example.html
Last active September 15, 2015 17:07
Creating a Line Chart with Phoenix
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
body {
font: 10px sans-serif;
}
@stormpython
stormpython / split.js
Created July 2, 2015 16:35
Recursive splitting of divs with D3
define(function (require) {
var d3 = require("d3");
return function split() {
var splitBy = function (d) { return d; };
var element = "div";
var elementClass = function () { return "horizontal"; };
var predicate = false;
function layout(selection) {