Skip to content

Instantly share code, notes, and snippets.

View jfirebaugh's full-sized avatar

John Firebaugh jfirebaugh

View GitHub Profile
load("@io_bazel_rules_docker//nodejs:image.bzl", "nodejs_image")
nodejs_image(
name = "image",
entry_point = "index.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
jfirebaugh / playground.rs
Created October 16, 2016 21:15 — forked from anonymous/playground.rs
Shared via Rust Playground
enum Expression {
Literal(u32),
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,
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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:366:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/system_error:223:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:3476:13: error: no matching function for call to '__invoke'
__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:3484:11: 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
jfirebaugh / node-debug.md
Last active June 3, 2016 15:35
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
jfirebaugh / index.js
Created November 14, 2014 00:22
Test for Transferable support in Web Workers
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);
return;
} catch (e) {
@jfirebaugh
jfirebaugh / README.md
Last active August 29, 2015 14:09 — forked from tmcw/README.md

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 OpenStreetMap.org. 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

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.
Scenario:
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