Skip to content

Instantly share code, notes, and snippets.

View jsvine's full-sized avatar

Jeremy Singer-Vine jsvine

View GitHub Profile
@jsvine
jsvine / exif.sh
Last active December 21, 2015 09:49
A ~/.bashrc one-liner I use almost daily. Provided the URL of an image, fetches the image's EXIF data.
exif () { curl -s "$1" | exiftool - ; }
###
#
# Add the line above to your ~/.bashrc file.
#
# Requires Phil Harvey's ExifTool: http://www.sno.phy.queensu.ca/~phil/exiftool/
#
# Usage example, for Aug. 20th's en.wikipedia.org featured picture:
#
@jsvine
jsvine / sms-backup-to-csv.rb
Last active January 6, 2024 21:25
A quick script to convert the XML from Android app "SMS Backup & Restore" into CSV.
#!/usr/bin/env ruby
# A quick script to convert the XML from Android app "SMS Backup & Restore" into CSV.
#
# Usage: $ ./sms-backup-to-csv.rb < PATH/TO/BACKUP/FILE.xml
require "nokogiri"
require "csv"
# Specify the backup file's attributes and data types.
@jsvine
jsvine / webscript-security-breach-email.md
Created November 7, 2012 18:16
"Potential Webscript security breach" email

from: Webscript Support support@webscript.io

date: Wed, Nov 7, 2012 at 12:54 PM

Subject: Potential Webscript security breach

Planet Rational's Amazon Web Services credentials have been inadvertently exposed, potentially leaking Webscript user data. (Planet Rational is the company behind Webscript.) While we don't know that any data was accessed, we do know that it was possible.

What we recommend

@jsvine
jsvine / _scam-js.md
Created November 5, 2012 16:10
Raspberry Ketone Javascript
@jsvine
jsvine / transcription.md
Created October 10, 2012 04:26
Frank Leslie A Life-Lengthener

Frank Leslie's Illustrated Newspaper — Dec. 15, 1860 — p. 53

(From the Home Journal)

FRANK LESLIE A LIFE-LENGTHENER.

By N.P. Willis

There are men who lengthen human life—those who shorten its industrial processes, or remove its hindrances or accelerate its compelled purposes and movements—enabling us to take ease and enjoy, where, before, we only lost life by toiling and suffering. It is for more time to live worthily, in fact, that we thank all great inventors—Morse for relieving us of suspense and dependence on mail-bags; Fulton for faster conveyance than by sails and stage-coaches; Whitney for a machine by which one man can do the work of three hundred; Hahnemann for enabling us to omit emetics and purges; Daguerre and Brady for superseding expensive portrait-sitting and difficult friend-remembering. And to this list of public benefactors we now think should be added Frank Leslie, who has rendered comparatively needless two of life's most laborious proceses, viz., the travelling and fancy-picturing

@jsvine
jsvine / draft.md
Created August 13, 2012 12:53
A Five-Borough Weekend

More than two years after moving to New York, I just had my first five-borough weekend. I full-throatedly recommend it. Much of the joy owed to letting the weekend develop organically; over-describing or -prescribing risks turning something fun into a checklist. But, in case you're simply curious, here's a synopsis:

Manhattan

It began inconspiculously. After work on Friday, I ambled down Sixth Avenue, having made what at the time felt like depressingly few weekend plans. I played and lost two chess games in Bryant Park at $1 apiece before deciding where to eat dinner: Phayul, a Tibetan restaurant that a friend and I had considered but decided against the previous weekend.

Queens

Phayul's location, a couple short blocks from the Roosevelt Ave. station in Queens's Jackson Heights neighborhood, makes it surprisingly accessible from midtown; I think the entire trip took less than a half-hour.

@jsvine
jsvine / draft.md
Created August 10, 2012 14:10
Brute-Forcing a Word Puzzle

All this week, I've been trying to chip away at Allen R. Morgan's "Twice Removed" puzzle on page 50 of the August 5, 2012 New York Times Magazine. The rules:

For each word below, add the same pair of letters *twice* 
to complete a longer word. For example, if you were given 
MOTE, you would add ON twice to make MONOTONE.

After a few days, I'd found just four of the 24 words. Pathetic. After moping for a bit, I tried brute-forcing the answers. The strategy was simple, but radically different from how you or I would try solving the puzzle by hand. The steps:

  1. Get a big list of English words.
@jsvine
jsvine / draft.md
Created August 8, 2012 14:56
Why I love Tabletop.js but don't use it in production

Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.

That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons:

@jsvine
jsvine / README.md
Created June 13, 2012 13:40
Most-Requested gTLDs -- 12 Jan 2012 through 30 May 2012
@jsvine
jsvine / draft.md
Created June 9, 2012 18:16
Versioned Writing

Versioned Writing — an experiment

Status: Very drafty.

Git for prose, Git for everything

Recently, I've become hooked on the idea of applying version-control software (and the concepts it enables) to writing. Git and GitHub have completely transformed, for the better, the way I write and think about software. I have a hunch they can something similar for writing.

Some form of versioning already exists, raggedly, in most prose-writing workflows. It's typically linear. For instance, we all have a folder somewhere that looks like this: