Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile
@dphiffer
dphiffer / facebook_recruiter.md
Created May 13, 2020 17:18
Re: Engineering Opportunity @ Facebook

Hi F—,

Thank you for contacting me. I know there are lots of engineers who would be really happy to work at Facebook.

I would like to explain briefly why I don't count myself among them, in the hopes that this might send a signal that Facebook's reckless business practices do incur costs that can be hard to fully account for.

OMG cookies 😱

On March 6, 2020 Jerome Paulos tweeted a screenshot to @themarkup informing us that our website had a cookie on it. This is bad because we've tried hard avoid using any tracking, and as of today themarkup.org does not serve any cookies.

Where'd the cookie come from?

As my colleague Simon Fondrie-Teitler responded:

Oh, thanks for catching this! I'm guessing those are Stripe-related cookies. If you go to the donate page, enter a number, and click "donate" the stripe javascript does load a couple cookies. See https://themarkup.org/donations/ for more info.

Hi W—,

That is really nice to hear that you’re into Mapzen services. Thanks for getting in touch, but I feel like Citizen might not be a great fit for me.

  • I stopped using a smartphone recently, in part to understand what the experience is like for those who cannot afford a data plan (and to work on the gaps)
  • That all residents (citizens as well as non-citizen residents) have smartphones seems an unfair assumption
  • I have done some training in bystander deescalation, and have complicated feelings about 911 as a sufficiently inclusive option, especially for people of color
  • I am in favor of police reform and reducing over-criminalization, and fear that the “5 o’clock news effect” might increase the overall sense that crime is rampant, driving public support for more policing

All that said, I only just got a first impression of Citizen. Hopefully you don’t mind me dropping my politics in, right up front. After a year like 2017 it feels more urgent to work on the things that are important to me.

@dphiffer
dphiffer / reinstall.md
Last active May 14, 2021 01:40
Notes for reinstalling macOS

I just did a clean install of macOS. Here's what got reinstalled on day one:

  • Atom
  • Audacity
  • Authy
  • Canon EOS Utility
  • Canon printer/scanner drivers
  • Clipy
  • Docker Desktop
  • Final Cut Pro
#!/bin/bash
# Testing out creating a gist using the GitHub API.
# https://developer.github.com/v3/gists/
# Requires a personal access token
# https://github.com/settings/tokens
# https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
user="dphiffer"
key="[snip]"
@dphiffer
dphiffer / blocks.js
Created August 22, 2019 21:12
Word → WordPress copy/paste filters
// re: https://github.com/WordPress/gutenberg/issues/16936
//
// n.b., these are pretty heavy-handed, they just strip out the comments & footnotes wholesale,
// and don't attempt to convert the content. Given a chance, I would try to ingest the footnotes
// in a more sophisticated way.
var ms_word_comments = function(node, doc) {
// Only filter on DOM elements
if (! node.getAttribute) {
@dphiffer
dphiffer / m3-phiffer-software-abstract.md
Last active May 14, 2019 15:10
Submission to The Maintainers III conference

Regulations.gov and the Public Comment Deliverator

Regulations.gov is a website that US government agencies use to inform their regulatory decision making. Congress writes laws and Federal agencies digest those laws into specific rules. Those regulatory choices are often informed by public commenting periods seeking input from anyone with a web browser and an opinion on the matter. To tweak Lawrence Lessig's model, if law is code, then this process could be thought of as shitposting on GitHub pull requests.

I have submitted over 100,000 public comments on regulations.gov as a software developer at the American Civil Liberties Union. I maintain The Public Comment Deliverator, a tool that submits public comments to regulations.gov, sourced from ACLU mailing list subscribers. My paper describes a case study in maintaining niche civic infrastructure software, challenges that come from scaling that process up, and includes observations on the ethics of using automation in this capacity.

A core challenge of T

@dphiffer
dphiffer / climate.sh
Created April 8, 2019 19:51
Shell script to print the current weekly mean value Mauna Loa CO2 value
#!/bin/bash
# Prints the current weekly mean value Mauna Loa CO2 value, and
# compares it to the value from 365 days ago.
# Thanks to Pieter Tans <[email protected]> for data guidance.
url="ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_weekly_mlo.txt"
line=`curl -s $url | tail -n 1`
@dphiffer
dphiffer / email_to_google_recruiter.md
Created January 9, 2019 21:58
Re: Greetings from Google!

Hi B—,

I appreciate that I made it through your candidate filters, it is a true privilege. I have friends at Google and, from what I've heard, it seems like it can be a great place to work.

Unfortunately I cannot imagine working at Google and I feel a responsibility to pass along my reasoning to you in the hopes that I might (if marginally) make a case for better corporate business practices. I want to make a case that key strategic choices are impacting your capacity to attract talent.

  • It doesn't seem like the conditions that motivated the Google Walkout have been fundamentally addressed.
  • Project Maven, Dragonfly, and probably other things that haven't yet come to light are extremely troubling.
  • A detail from the Dragonfly story that struck me was how the company excluded the privacy review team from its considerations.
  • From CNBC: "Google's annual diversity report reveals that the company's workforce is still largely white and male and that it made very little progress in the last year to change th
@dphiffer
dphiffer / unpopular_baby_names.py
Last active December 29, 2018 18:24
What are the least popular American baby names? Sorted by the year of first usage.
import csv, os, re
# https://www.ssa.gov/oact/babynames/state/namesbystate.zip
path_to_names = '.'
names = []
index = {}
# Iterate over each state file (e.g., CA.TXT).
for filename in os.listdir(path_to_names):