Skip to content

Instantly share code, notes, and snippets.

View zachmargolis's full-sized avatar

Zach Margolis zachmargolis

View GitHub Profile
@zachmargolis
zachmargolis / Makefile
Last active October 21, 2015 23:30
SF Shoreline
topojson = node_modules/topojson/bin/topojson
$(topojson): package.json
npm install
touch -c $(topojson) || exit 1
sfshore/sfshore.shp:
mkdir -p sfshore/
# https://data.sfgov.org/Geographic-Locations-and-Boundaries/San-Francisco-Shoreline-Zipped-Shapefile-Format-/kj7y-jjpu
curl -L https://data.sfgov.org/download/kj7y-jjpu/ZIP > sfshore.zip
@zachmargolis
zachmargolis / index.html
Created April 1, 2015 15:33
Line Comparison
<!DOCTYPE html>
<html>
<head>
<title>WOO</title>
<style>
body {
font: 10pt/12pt "Helvetica", sans-serif;
}
@zachmargolis
zachmargolis / demo.sh
Last active August 29, 2015 14:03
Java the Script
$ ./java-the-script
Usage: ./java-the-script -e JAVA_CODE
-i, --import PACKAGE import PACKAGE before compiling code
--debug debug mode: print the generated Java source
-e JAVA_CODE Java source to compile and run
-h, --help Show this message
$ echo "wooooo" | ./java-the-script -e 'System.out.println(STDIN.read().toUpperCase());'
WOOOOO
$ ./java-the-script -i java.util.Calendar -e 'System.out.println(Calendar.getInstance().get(Calendar.YEAR));'
2014
@zachmargolis
zachmargolis / Procfile
Last active August 29, 2015 14:02
Cumulative Retention Rates
server: python -m SimpleHTTPServer
@zachmargolis
zachmargolis / .gitignore
Last active October 18, 2017 09:53
Bouncy Castle Errors
target/*
*.iml
.DS_Store
.idea
@zachmargolis
zachmargolis / README.md
Last active August 29, 2015 13:56
Stack-to-Split Transition

Stack-Split Transition

Transitions between stacked and split (small multiples) area charts.

def x(a: 1, b: 2); end
def y(required, a: 1, b: 2); end
def z(optional = nil, a: 1, b: 2); end
method(:x).arity # => 0, no required args
method(:y).arity # => 1, 1 required arg
method(:z).arity # => -1, 0 required, 1 optional