This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
body,html { margin: 0; padding: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert(path) { | |
var arr = []; | |
var len = path.getTotalLength(); | |
var p; | |
for (var i = 0; i < len; i++) { | |
p = path.getPointAtLength(i); | |
arr.push([parseFloat(p.x), parseFloat(p.y)]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Requires: | |
# - gdal_sieve.py | |
# - ogr2ogr (GDAL) | |
# - topojson (node.js) | |
# Grab the relative directory for source file. | |
SRC_DIR=`dirname $0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var async = require('async'); | |
var glob = require('glob'); | |
var slugify = require('slugify'); | |
var parseCSV = require('csv-parse'); | |
var rimraf = require('rimraf'); | |
var d3 = require('d3'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default class Path extends React.Component { | |
constuctor(props) { | |
super(props); | |
this.state = { | |
d: props.d || props.initialD, | |
fill: props.fill || props.initialFill, | |
stroke: props.stroke || props.initialStroke, | |
className: props.className || props.initialClassName, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ERROR | E_PARSE); | |
header('Content-Type: application/json'); | |
class API { | |
const CACHE_FILE = "./addresses.txt"; | |
private $hash = array(); | |
public $crimes = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
# File: /usr/bin/deploy | |
######################################## | |
#!/bin/sh | |
REF_NAME=$1 | |
DEPLOY_BRANCH=$2 | |
REMOTE_PROJECT_PATH=$3 | |
REMOTE_SERVER=$4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// This will need to change depending on the enviornment. | |
// Necessary data files should be included here. Don't | |
// forget the trailing slash. | |
var DATA_DIR = "/widgets/railroads_and_states/dist/data/"; | |
// This key is kind of weird. It represents the United | |
// States in total within the data. Saving as a constant | |
// incase it's changed to something like "Nation", which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoose = require 'mongoose' | |
helpers = require '../libs/helpers' | |
events = require "../libs/events" | |
config = require "../config" | |
async = require "async" | |
types = | |
STATUS: "status" | |
INTRODUCTION: "introduction" | |
NOTIFICATION: "notification" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require underscore | |
#= require typewriter | |
$ -> | |
# Homepage typewriter effect. | |
typeWriterElement = document.getElementById "looking-for-prompt" | |
if typeWriterElement | |
counter = 0 | |
desires = _.shuffle [ | |
"Anyone like craft brews?", |