Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile

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 <pieter.tans@noaa.gov> 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):

EPA Meets EPA:
Who: Environmental Performance Agency
What: Campaign Kickoff : Nominate Mugwort for EPA Science Advisory Board
When: Friday, June 15, 2018
Where: gather at 2 pm Transformer Gallery, 1404 P Street NW, Washington DC, arrive 3 pm US EPA Offices, Federal Triangle, 12th & Constitution Ave., NW

Environmental Performance Agency kicks off 2018 campaign to nominate Mugwort (Artemisia vulgaris) for US EPA Science Advisory Board

The Environmental Performance Agency’s Department of Weedy Affairs officially kicks off its 2018 campaign for the nomination of Mugwort (Artemisia vulgaris) to the US EPA Science Advisory Board at 2pm on June 15, 2018 at Transformer, 1404 P Street, NW, Washington DC.

@dphiffer
dphiffer / alexa.md
Last active May 14, 2018 22:21
Email to an Amazon recruiter (Re: "Alexa, Let's Try Again")

Hi ███████,

Somehow your other emails didn't register, but I did want to write and let you know that I'm not interested. Thanks for writing though, I do appreciate that I made it through your filters.

The reason I'm not interested in working on Alexa (and other similar IoT devices) is I think they are irresponsible outside of narrowly bracketed vision-impairment accessibility situations. The trade-off of privacy for convenience is only really possible for specific groups of very privileged people.

More generally, I don't think Amazon treats its warehouse workers very well, and I would feel bad being complicit in their continued mistreatment. The HQ2 effort to minimize tax exposure, followed by public statements by your CEO about how he's deciding how to spend his "winnings" would make me feel ashamed to call myself an Amazon employee.

I don't write this because I think you are going to fix these things, but because I think it's my responsibility to help push back on abusive business practices. You need