Skip to content

Instantly share code, notes, and snippets.


John Firebaugh jfirebaugh

View GitHub Profile
load("@io_bazel_rules_docker//nodejs:image.bzl", "nodejs_image")
name = "image",
entry_point = "index.js",
View bench_geodata.js
const numFeatures = 100;
const numPolygons = 5;
const numRings = 10;
const numPoints = 10000;
console.time('populate storage');
const features = [];
for (let i = 0; i < numFeatures; i++) {

Hi ____,

I appreciate you reaching out. Unfortunately, I can't consider working at Uber because I believe that the company behaves unethically and has produced a culture that is harmful to its employees, to the software engineering profession, and indeed to the public at large. Specifically:

  • Numerous allegations of sexual harassment and mistreatment of women employees
  • Attempts to evade regulatory investigation and oversight via greyballing
  • Running an unpermitted self-driving car program in San Francisco in which vehicles ran red lights, lurched into intersections, and made illegal right turns, putting pedestrians, cyclists, and other drivers at risk, and then misleading the public about whether the incidents occurred while the vehicle was under autonomous control
  • Reports from former forensic investigator that lack of internal controls allowed employees to track high profile politicians, celebrities, personal acquaintances, and ex-partners
  • The participation of Travis Kalanick in Trump's business ad
jfirebaugh /
Created Oct 16, 2016 — forked from anonymous/
Shared via Rust Playground
enum Expression {
Add(Box<Expression>, Box<Expression>),
Sub(Box<Expression>, Box<Expression>)
impl Expression {
fn map<F: Fn(Expression) -> Expression>(self, f: F) -> Expression {
match self {
Expression::Literal(_) => self,
View gist:01805dc7c4db10d5c154
In file included from /Users/john/Development/mapbox-gl-native/src/mbgl/util/worker.cpp:1:
In file included from src/mbgl/util/worker.hpp:5:
In file included from src/mbgl/util/thread.hpp:4:
In file included from /Applications/
In file included from /Applications/
/Applications/ error: no matching function for call to '__invoke'
__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)
/Applications/ note: in instantiation of template class 'std::__1::__invokable_imp<(lambda at /Users/john/Development/mapbox-gl-native/src/mbgl/util/worker.cpp:38:28),
jfirebaugh /
Last active Jun 3, 2016
Tips and tricks for debugging native modules in node

Building a native module (node-gyp) with debug symbols

cd node_modules/module
node-gyp rebuild --debug

(You might have to adjust require paths from Release to Debug.)

Building node with debug symbols

jfirebaugh / index.js
Created Nov 14, 2014
Test for Transferable support in Web Workers
View index.js
if (typeof window !== 'undefined') {
(function() {
var worker = new Worker("index.js"),
buffer = new ArrayBuffer(10);
try {
worker.postMessage({buffer: buffer}, [buffer]);
console.log('postMessage with array transfer', buffer.byteLength);
} catch (e) {

Crashes in Chrome Version 38.0.2125.104


I spent last year working on the iD editor for OpenStreetMap and on the design and functionality of I'm going to talk a little bit and at a high level about the technical side of those efforts — enough to give you an idea of what their goals were — but most of this talk is about the human side, about community management and open source stewardship.

My hope for this talk is that sharing what worked for me and my collaborators will help three groups of people: first, open source contributors who, like me, want to help the project tackle big technical challenges. Second, other outside organizations — public or private — that want to engage effectively with the OSM community. And finally, members of the community who want to see OpenStreetMap become a more friendly and welcoming community for everyone who would like to contribute.

I work at Mapbox — Mapbox paid me to work on iD and on the website. So first I want to answer the question: why does Mapbox care about OpenStreetMap anyway? Why wo

View ood_dependencies.feature
Feature: NPM notifies me when my dependencies are out of date
In order to avoid accidentally running the tests against out of
date dependencies, npm should notify me when I try to do so.
Given I have a package.json that declares a dependency on foo@1.0
And I have run `npm install` and installed foo@1.0
And my coworker updates package.json to depend on foo@1.1
When I pull that change and run `npm test`
Then I should get an error