Skip to content

Instantly share code, notes, and snippets.

Jeremy B. Merrill jeremybmerrill

Block or report user

Report or block jeremybmerrill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jeremybmerrill on github.
  • I am jeremybmerrill ( on keybase.
  • I have a public key whose fingerprint is 441A 05CC B462 AF95 45FA 95B5 CDF7 BBEF F5A7 B374

To claim this, I am signing this object:

View gist:753a4dea25170b1513fb
# Description:
# Give, Take and List User Points
# Dependencies:
# None
# Configuration:
# None
# Commands:
jeremybmerrill /
Created Oct 16, 2014
keybase verification

Keybase proof

I hereby claim:

  • I am jeremybmerrill on github.
  • I am jeremybmerrill ( on keybase.
  • I have a public key whose fingerprint is 1B27 B244 205A C0B3 AAED 0F02 7780 C469 4F62 1BA0

To claim this, I am signing this object:

jeremybmerrill / tabula-win-tester.rb
Last active Aug 29, 2015
Tracking down the commit that broke tabula-0.96 for Windows (issue #203)
View tabula-win-tester.rb
#!/usr/bin/env ruby
# Tabula 0.9.6 for Windows fails: Unknown Error (206) - __UNKNOWN_CONSTANT__
# for more discussion see
require 'open3'
revisions = ["3286e6ce0a2ee9eee617b0b1b23c3ada1effcbac",
"45404fa07fb3ddaf2280ec03b7d2f84e20396e88", #fails UNKNOWN_CONSTANT
jeremybmerrill / cyberlist.yml
Created Dec 23, 2014
Most common `cyber X` word-pairs in certain New York Times, ProPublica, Washington Post, Politico articles and congress speeches since sometime in 2013
View cyberlist.yml
cyber security: 384
cyber threats: 87
cyber attacks: 826
cyber businesses: 1
cyber protection: 1
cyber espionage: 10
cyber surveillance: 1
cyber theft: 2
cyber area: 1
jeremybmerrill / bpl-locations.geojson
Created Jan 2, 2015
Brooklyn Public Library locations in GeoJSON format
View bpl-locations.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
jeremybmerrill / gist:1d058424aca5ebe2eb3d
Created Apr 7, 2015
export from RDS mysql to a CSV
View gist:1d058424aca5ebe2eb3d
# on mac, replace TABGOESHERE with a tab by typing Ctrl-V then the Tab key
mysql -u USERNAME --database=dbname --host=HOST --batch -e "select * from tablename" |
sed 's/TABGOESHERE/","/g'| sed 's/^/"/g' | sed 's/$/"/g' | sed 's/\n//g' > destination.csv
View ocr_pdf.rb
#! /usr/bin/env ruby
require 'pdfshaver'
# brew install ghostscript imagemagick #yikes
# brew install tesseract --HEAD # needs >=3.04
ARGV.each do |pdf|
puts pdf
pdf_basename = pdf.gsub(".pdf", '')
jeremybmerrill / Resque.rake
Created Aug 10, 2012
Sample resque.rake for workers on multiple servers
View Resque.rake
require 'resque/tasks'
require 'resque_scheduler'
require 'resque_scheduler/tasks'
require 'resque_scheduler/server'
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
resque_config = YAML.load_file(rails_root + '/config/resque.yml') #contains Redis's location on the network for different Rails environments
Resque.redis = resque_config[rails_env]
jeremybmerrill / PhotostreamJob.rb
Created Aug 10, 2012
PhotostreamJob demonstrates inheritance as a way of dynamically assigning a Resque job to a queue
View PhotostreamJob.rb
class PhotostreamJob < BaseJob
@queue = :photostreamphotos
You can’t perform that action at this time.