Skip to content

Instantly share code, notes, and snippets.

View jsvine's full-sized avatar

Jeremy Singer-Vine jsvine

View GitHub Profile
@veltman
veltman / README.md
Created October 10, 2016 16:08
Geosupport w/ JS and node-ffi

Geocoding 10,000 addresses a second with NYC's Geosupport library and Node FFI

Following on Chris Whong's excellent writeup of how to make calls directly to NYC's Geosupport client and this first attempt at generalizing it, here's a way that let me geocode about 10,000 addresses a second on Ubuntu using Node FFI.

Note: this assumes Ubuntu - other Linux is probably fine but may need adjustments.

First, install the basics:

# Update, install Node and unzip (if needed)
@dannguyen
dannguyen / florida-prison-access-mdb-to-csv-sql.md
Last active December 14, 2021 16:33
converting Florida prison Access database into separate CSV and SQLite files
@dwtkns
dwtkns / l8get
Last active October 1, 2017 20:19
A shell function to quickly grab the data for a given Landsat 8 tile ID from Google's servers
# This is a shell function to quickly grab the data for a given Landsat 8 tile ID from Google's servers
# For example:
# l8get LC81690352014169LGN00
# The echo at the end is to remind myself of the syntax for extracting bands 8, 4, 3, and 2. (Pansharp, Red, Green, Blue)
# On OSX this would go into your ~/.bash_profile file.
# Requires gsutil from https://developers.google.com/storage/docs/gsutil_install
# Most useful in conjunction with USGS' Earth Explorer: http://earthexplorer.usgs.gov/
cd ~/
# Add QGIS repo
sudo add-apt-repository -s "deb http://qgis.org/debian trusty main"
# Add TileMill repo
sudo add-apt-repository ppa:developmentseed/mapbox
# Update/upgrade
sudo apt-get update && sudo apt-get upgrade
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select
@vaguity
vaguity / Hacks-Hackers NYC: Encryption and Operational Security for Journalists (2013-09-16).md
Last active April 29, 2016 17:34
Notes from Hacks/Hackers NYC workshop on encryption and opsec for journalists. Notes come from talk by Jennifer Valentino.

Hacks/Hackers NYC: Encryption and Operational Security for Journalists (2013-09-16)

Jennifer Valentino, Wall Street Journal (@jenvalentino)

These notes come straight from Jennifer's presentation; slides at https://docs.google.com/file/d/0B2HGtAJEbG8PdzVPdHcwekI2V2M/edit

Background

  • NSA covers 75% of internet traffic; not all is collected or sifted
  • Big issues with suveillance are not the NSA but leak investigations, subpoenas, accidental disclosure and chilling effects on sources
@pippinlee
pippinlee / bv-books.md
Created September 12, 2013 03:53
Some of these can't be found on Amazon anymore and must be found the fun way, hunting through your local book shop.
@veltman
veltman / gist:6186441
Last active December 20, 2015 19:49
Bookmarklet, when executed on a google search results page it will cycle through everything in search_terms[] and record the suggestions to a big JSON object. After it cycles through all the terms, it will replace the document HTML with the stringified JSON. Minify it before using it.
(function(){
//get jQuery
if (window.jQuery === undefined) {
var done = false;
var script = document.createElement("script");
script.src = "http:////ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
done = true;
/*
Usage:
When generating a page:
var abTest = new AbTest('your-test-slug');
if (abTest.variation == 0)
$('#thediv').addClass('red');
else if (abTest.variation == 1)
@jonkeegan
jonkeegan / iPhoto Faces
Created March 5, 2013 16:25
Here's a nice little one liner for your Mac that will create a giant mosaic image of all the faces iPhoto has found in your photos taken in 2013. Requires imagemagick, and assumes your iPhoto Library is in it's regular spot. This is for the latest version of iPhoto '11. The faces are ALL of the faces iPhoto can find, even if they haven't ben nam…
montage null: ~/Pictures/iPhoto\ Library/Thumbnails/2013*/*/*/*/IMG_*_face*.jpg null: -gravity center ~/Desktop/2013_faces.png