Skip to content

Instantly share code, notes, and snippets.


Chris Henrick clhenrick

View GitHub Profile
clhenrick / StartAudioContext.js
Created Jan 7, 2018 — forked from AvneeshSarwate/basic.html
Tone.Sequence not running on iOS
View StartAudioContext.js
* StartAudioContext.js
* @author Yotam Mann
* @license MIT License
* @copyright 2016 Yotam Mann
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define([], factory)
} else if (typeof module === "object" && module.exports) {
clhenrick / .block
Created Jun 27, 2016 — forked from mbostock/.block
Shape Tweening
View .block
license: gpl-3.0
clhenrick /
Created Jun 15, 2016 — forked from almccon/
turbo-cartocss examples

Color ramps: *-fill

Basic usage

marker-fill: ramp([column_name], colorbrewer(Greens));
                  |                    |
                  v                    |
      column to calculate ramp         |
clhenrick /
Last active Jun 15, 2016 — forked from syntagmatic/
clhenrick /
Last active Aug 29, 2015 — forked from aepyornis/
From Ziggy's NYC Turn On The Heat! map:

A day in SQL HELL: or how I learned to like (or at least appreciate) SQL by ziggy

In short: the secret to who owns nyc will probably be found in a really complicated sql statement

Here's how this all started. I was working on my project to analyze heat/hot water complaints. I downloaded all the complaints for this heat season (there's over 200,00), geocoded them to obtain the bbls, and then imported them into postgres. I wanted to match complaints with their owners in order to find out whose responsible for not providing tenants' with essential services.

So I fired up PSQL and started typing out some queries.

SELECT bbl, 
import csv
import urllib
import re
from nyc_geoclient import Geoclient
from sys import argv
from sys import exit
script, infile, outfile = argv
g = Geoclient('9cd0a15f', '54dc84bcaca9ff4877da771750033275')
View gist:bc741963eca6650378af
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c"
View jsonp.js
* loadJSONP( url, hollaback [, context] ) -> Null
* - url (String): URL to data resource.
* - hollaback (Function): Function to call when data is successfully loaded,
* it receives one argument: the data.
* - context (Object): Context to invoke the hollaback function in.
* Load external data through a JSONP interface.
* ### Examples
View Sublime Text 2 HTML5 Boilerplate Snippet
<content><![CDATA[<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${1:Project Name}</title>
You can’t perform that action at this time.