Skip to content

Instantly share code, notes, and snippets.

View brett-miller's full-sized avatar

Brett Miller brett-miller

  • Expedia
  • Seattle
View GitHub Profile
@brett-miller
brett-miller / index.html
Last active August 29, 2015 14:12 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.graticule {
fill: none;
stroke: #777;
}
.boundary {
!function() {
var d3 = {
version: "3.5.3"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
@brett-miller
brett-miller / index.html
Last active August 29, 2015 14:24 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<body style="overflow:hidden; background: black">
<canvas></canvas>
</body>
<script>
/* https://github.com/d3/d3-timer Copyright 2015 Mike Bostock */
"undefined"==typeof requestAnimationFrame&&(requestAnimationFrame="undefined"!=typeof window&&(window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame)||function(e){return setTimeout(e,17)}),function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.timer={})}(this,function(e){"use strict";function n(){r=m=0,c=1/0,t(u())}function t(e){if(!r){var t=e-Date.now();t>24?c>e&&(m&&clearTimeout(m),m=setTimeout(n,t),c=e):(m&&(m=clearTimeout(m),c=1/0),r=requestAnimationFrame(n))}}function i(e,n,i){i=null==i?Date.now():+i,null!=n&&(i+=+n);var o={callback:e,time:i,flush:!1,next:null};a?a.next=o:f=o,a=o,t(i)}function o(e,n,t){t=null==t?Date.now():+t,null!=n&&(t+=+n),l.callback
@brett-miller
brett-miller / README.md
Last active October 27, 2015 15:34 — forked from maartenzam/README.md
Fly over latitude parallel

My first experiment with Mapbox GL is a mock up of what astronauts in the ISS could see out of their window.

This map let's you fly over the latitude parallel of your choice. You can change

  • the baselayer (hybrid, streest of satellite)
  • the parallel you are flying over (pan left or right)
  • the zoom (+ and - in upper right corner)
  • rotation of view (the compass in the upper right corner)
@brett-miller
brett-miller / README.md
Last active December 31, 2015 08:16 — forked from mbostock/.block
Scatterplot
@brett-miller
brett-miller / gist:f5dc8cf16750f4fe541c
Created January 11, 2016 23:11
Create an base64 image from a font awesome icon
function getFontAwesomeIcon(unicodeString,color){
var canvas=document.createElement("canvas");
canvas.height=16;
canvas.width=16;
var context= canvas.getContext("2d");
context.font="15px FontAwesome";
context.fillStyle = color;
context.fillText(String.fromCharCode(parseInt(unicodeString, 16)), 0, 16);
return canvas.toDataURL("image/png", 1.0);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brett-miller
brett-miller / dbf_to_geojson.sh
Last active March 16, 2016 02:40
list of dbf files to geojson
Convert folder of dbf files to geojson
'''sh
ls " | awk '{ system("ogr2ogr -f GeoJSON " $1 "/.geojson" $1) }'
'''
FARS user data manual: ftp://ftp.nhtsa.dot.gov/FARS/FARS-DOC/USERGUIDE-2014.pdf
Washington State Code = 53
@brett-miller
brett-miller / .block
Last active October 3, 2016 04:30 — forked from mbostock/.block
Screen Recording to GIF
license: gpl-3.0
@brett-miller
brett-miller / .block
Last active July 25, 2016 16:59 — forked from mbostock/.block
Letter Frequency
license: gpl-3.0