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
@stormpython
stormpython / Rows, Columns, Grid Layout Example.markdown
Created November 10, 2015 18:01
Rows, Columns, Grid Layout Example
@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 / 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 / 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 / README.md
Last active May 4, 2016 11:14
D3 Directives in Angular
'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';
'use strict';
// modules
import React from 'react';
import ReactDOM from 'react-dom';
import d3 from 'd3';
let PropTypes = React.PropTypes;
class Container extend React.Component {
import { cloneDeep, findIndex, first, isFunction } from 'lodash';
export default function () {
let x = (d) => d.x;
let y = (d) => d.y;
let xScale = d3.scale.linear();
let yScale = d3.scale.linear();
function X(d, i) {
return xScale(x.call(this, d, i));
@stormpython
stormpython / README.md
Last active February 6, 2019 05:00
Angular D3 Directives with Elasticsearch
@stormpython
stormpython / raspberrypi_server.md
Last active May 1, 2019 20:14
Setting up a Raspberry Pi Home Server

Setting up a Home Server with Raspberry Pi

Downloading and Installing Wheezy Raspbian

Download the latest wheezy raspbian raw image and install onto a 4GB+ SD card following the RPi Easy SD Card Setup instructions.

Server Setup

  1. Insert the SD Card. Attach a keyboard, mouse, and monitor to your Raspberry Pi before booting it up.
  2. The Raspberry Pi has a nice "raspi-config" screen that you'll see on first boot. For a home server, the following selections will be useful: