Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile
@dphiffer
dphiffer / rsync_disk_recovery.md
Last active July 21, 2017 09:44
How we dealt with the @eirons disk failure of 2017

How we dealt with the @eirons disk failure of 2017

Context Drive that won't boot

  • Boot Sad Laptop into Single User mode (hold down cmd-S on startup, reference)
  • Make the disk writable: mount -uw /
  • Plug in an external drive
  • Determine which disk the external one is: ls –l /dev/disk* (in this case /dev/disk2s1)
@dphiffer
dphiffer / eyeo_cryptoparty.txt
Created July 12, 2017 01:23
Hastily typed notes from the CryptoParty at Eyeo Festival 2017
All credit for this goes to Matt Mitchell
https://twitter.com/geminiimatt
macOS
FileVault: on
Firewall: on
Password managers
Dashlane
OnePassword
LastPass
@dphiffer
dphiffer / read_write_offline_mapping.md
Last active June 16, 2017 15:04
Read/write Offline Mapping / 2017 Seoul Biennale of Architecture and Urbanism

refill theme

Facilitated by Dan Phiffer, Read/write Offline Mapping speculates open source mapping practices that don’t require cloud-based services. How can we collect and communicate geographic information without a constant connection to proprietary data centers? How can we navigate the complicated relationship between corporate interests, online maps as utility, and open source projects?

who's on first

In this two-day workshop, participants will be introduced to the existing tools and methods of creating and maintaining open data for open mapping, including POSM (Portable OpenStreetMap) and Who’s On First, and will be engaged in developing their own independent maps.

Maps have become a critical facet of how we interface with the landcape around us. Key to our capabilities to navigate and understand the world are these questions:

@dphiffer
dphiffer / index.html
Created June 14, 2017 19:17
WOF API Example (with new Refill colors!)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WOF API example</title>
<style>
body {
margin: 0;
}
@dphiffer
dphiffer / wikidata_mission.csv
Created June 14, 2017 13:50
select * from entity where lat > 37.748212 and lat < 37.7725278668 and lng > -122.431025471 and lng < -122.405240263;
id name instance_of lat lng
Q564339 Central Freeway Q34442 37.77 -122.421
Q4552246 16th Street Mission Station Q55488 37.7648 -122.42
Q4796232 Arroyo Dolores Q618123 37.762638888889 -122.41671111111
Q4943962 Bootie 37.7711 -122.413
Q5116742 Church and 22nd Street Q2175765 37.7549 -122.428
Q5116746 Church and Clipper Q2175765 37.7493 -122.427
Q6056711 Intersection for the Arts Q1007870 37.7658 -122.422
Q7927081 Victoria Theatre, San Francisco Q3469910 37.765 -122.419
Q8033549 Woodward's Gardens 37.768 -122.421
@dphiffer
dphiffer / wikidata_flatiron.csv
Created June 14, 2017 13:40
select * from entity where lat > 40.738403 and lat < 40.744255 and lng > -73.999201 and lng < -73.976885;
id name instance_of lat lng
Q63751 Rubin Museum of Art Q207694 40.740111111111 -73.997805555556
Q904191 Theodore Roosevelt Birthplace National Historic Site Q41176 40.738889 -73.989722
Q1427377 Flatiron District Q123705 40.7408 -73.9896
Q2478033 23rd Street Q55488 40.743889 -73.995556
Q2478345 23rd Street Q55488 40.7429 -73.9929
Q2515468 18th Street Q928830 40.740833 -73.997778
Q3163335 Jazz Standard 40.7422 -73.9838
Q4557667 18th Street Q55488 40.7398 -73.995
Q4631696 23rd Street Q55488 40.7388 -73.9832
wof_id onestop_id name latitude longitude
1108956235 s-dr5nqr57gy-tottenville Tottenville 40.512764 -74.251961
1108956237 s-dr5nqrxgq4-atlantic Atlantic 40.515401 -74.245689
1108956239 s-dr5nqxfd1v-arthurkill Arthur Kill 40.516578 -74.242096
1108956241 s-dr5nw8j32e-nassau Nassau 40.517812 -74.238373
1108956243 s-dr5nwb7gzw-richmondvalley Richmond Valley 40.519631 -74.229141
1108956245 s-dr5nx0uhnu-pleasantplains Pleasant Plains 40.52241 -74.217847
1108956247 s-dr5nx93njn-princesbay Prince's Bay 40.525507 -74.200064
1108956251 s-dr5nxdzjvb-huguenot Huguenot 40.533674 -74.191794
1108956253 s-dr5q8h1j63-annadale Annadale 40.54046 -74.178217
<?php
// Re: https://twitter.com/anildash/status/856690635872493569
// with some help from https://github.com/dphiffer/emoji-index
$json = file_get_contents('emoji-index.json');
$emoji = json_decode($json);
echo <<<END
<?xml version="1.0" encoding="UTF-8"?>
@dphiffer
dphiffer / 0_transitland_nyc_subway.sh
Last active May 11, 2017 15:22
Loads all of the NYC subway stations from transit.land into a CSV file
#!/bin/bash
# This script outputs a CSV file constructed from transit.land's dataset of
# subway stops in NYC.
# See also: https://transit.land/documentation/datastore/api-endpoints.html
#
# (20170415/dphiffer)
url="https://transit.land/api/v1/stops?served_by=o-dr5r-nyct"
raw_csv="transitland_nyc_subway_dupes.csv"
@dphiffer
dphiffer / war_collector.sh
Created October 13, 2016 00:24
A script to collect (conserve? steal?) Constant Dullaart's "war" web pages
#!/bin/sh
# A script to collect (conserve? steal?) Constant Dullaart's "war" web pages
# See: https://twitter.com/constantdull/status/785797564167839744
# Usage: ./war_collector.sh
start_from="war.repair"
if [ ! -d src ] ; then