Skip to content

Instantly share code, notes, and snippets.

View achavez's full-sized avatar

Andrew Chavez achavez

View GitHub Profile
@achavez
achavez / custom.js
Created November 28, 2016 15:33
First attempt at using our Mapbox-style vector tiles with
var layers = ['water', 'road'];
window.renderTiles = function(d) {
var svg = d3.select(this);
this._xhr = d3.request("http://maps.dallasnews.com/" + d[2] + "/" + d[0] + "/" + d[1] + ".pbf").responseType('arraybuffer').get(function(error, json) {
if(error) return console.error(error);
var tile = new VectorTile( new Pbf( new Uint8Array(json.response) ) );
var extents = 4096;
@achavez
achavez / custom.js
Created November 28, 2016 15:33
First attempt at using our Mapbox-style vector tiles with D3
var layers = ['water', 'road'];
window.renderTiles = function(d) {
var svg = d3.select(this);
this._xhr = d3.request("http://maps.dallasnews.com/" + d[2] + "/" + d[0] + "/" + d[1] + ".pbf").responseType('arraybuffer').get(function(error, json) {
if(error) return console.error(error);
var tile = new VectorTile( new Pbf( new Uint8Array(json.response) ) );
var extents = 4096;
@achavez
achavez / README.md
Last active February 25, 2017 17:25

ONA DFW coding exercises

HTML exercise 1

Format the article below with HTML.

<html>
	<head>
		<title></title>
@achavez
achavez / README.md
Last active January 10, 2018 19:31
Installing an old version of a Homebrew formula

Installing an old version of a Homebrew formula

Let's say, like me, you accidentally upgraded PostgresQL or PostGIS or something super important and now you need to go back in time and install the previous version.

  1. Find the commit of the old version that you want to install by looking through the Formula/ directory in the homebrew-core repo: https://github.com/Homebrew/homebrew-core/commits/master/Formula/ (If the above doesn't work, you'll need to clone the homebrew-core repo to your machine and run git log master -- Formula/<formula name>.rb).

  2. Unlink the existing (newer) version:

    $ brew unlink <formula_name>