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
# Some utilities for sending notifiations to yourself from the command line (mac only). | |
# Just add them to your ~/.bashrc and fill in these parameters. | |
# See them all in action: "ugh <long running command> && woof command succeeed || woof command failed" | |
TWITTER_HANDLE= # twitter handle | |
EMAIL_ADDRESS= # email address | |
CELL_EMAIL_ADDRESS= # email address for your cell phone (ie [email protected]) | |
TERMINAL_APP="com.apple.Terminal" # replace with iterm if you use that | |
THEME_SONG="~/waiting.mp3" # replace with a path to your theme song |
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 fitProjection(projection, data, box, center) { | |
// get the bounding box for the data - might be more efficient approaches | |
var left = Infinity, | |
bottom = -Infinity, | |
right = -Infinity, | |
top = Infinity; | |
// reset projection | |
projection | |
.scale(1) | |
.translate([0, 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
<!DOCTYPE html> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<meta name=apple-mobile-web-app-capable content=yes> | |
<meta name=apple-mobile-web-app-status-bar-style content=black> | |
<title>Test fullscreen</title> | |
<style> | |
html, body { | |
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
var simplifyPath = function( points, tolerance ) { | |
// helper classes | |
var Vector = function( x, y ) { | |
this.x = x; | |
this.y = y; | |
}; | |
var Line = function( p1, p2 ) { | |
this.p1 = p1; |