Skip to content

Instantly share code, notes, and snippets.

🌊
ride the wave

Harper Reed harperreed

🌊
ride the wave
Block or report user

Report or block harperreed

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
@harperreed
harperreed / shiftmca.py
Last active Apr 10, 2017 — forked from mushroomhostage/gist:3807487
shiftmca.py - shift Minecraft region files (.mca) to combine multiple worlds into one
View shiftmca.py
# shiftmca.py - shift Minecraft region files (.mca) by a fixed number of regions
# Useful to combine multiple worlds into one world, with a region-level granularity
# You can't simply rename the r.#.#.mca files, because they contain embedded location
# information (which will cause "relocating" errors). This script fixes that.
# To use:
# 1. rename each r.<x>.<z>.mca adding 20 (or whatever needed to avoid overlap) to each <x>
# 2. edit the variables below appropriately to match your setup
# 3. run this script
@harperreed
harperreed / scrapple.py
Last active Dec 25, 2015 — forked from jhofman/scrapple.py
updated to check all models in a specific zip
View scrapple.py
#!/usr/bin/env python
#
# file: scrapple.py
#
# description: checks apple.come for iphone 5s in-store pickup availability
#
# usage: ./scrapple.py [zip]
#
# or in a crontab:
# */5 * * * * /path/to/scrapple.py 10012 && mailx -s 5s 2125551212@vtext.com
@harperreed
harperreed / gist:1756940
Created Feb 7, 2012 — forked from obsesh/gist:1738514
2012 updated sxsw scrapper
View gist:1756940
import urllib, mechanize
import time
import simplejson
import os
import sys
from multiprocessing import Pool
import pickle
View install-graphite-ubuntu-10.04.sh
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
View update_hooks.rb
require 'github_v3_api'
g = g=GitHubV3API.new(ENV['GITHUB_OAUTH2_TOKEN'])
cfa = g.orgs.list.first
names = cfa.repos.map(&:name)
names.each do |name|
hooks = g.get("/repos/codeforamerica/#{name}/hooks")
scream_hook = hooks.find {|h| h["name"] == "web" && h["config"]["url"] =~ /6178/}
@harperreed
harperreed / aws_usage.py
Created Sep 12, 2011 — forked from noneal/aws_usage.py
A script to query the Amazon Web Services (S3/EC2/etc) usage reports programmatically.
View aws_usage.py
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
View aws_usage.py
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
View cid.rb
# needs http://jocr.sourceforge.net/
# sudo port install gocr
#
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open("http://cidlookup.com/lookup/#{ARGV[0].gsub("-","")}/"))
image_url = "http://cidlookup.com" + doc.css("#content .gt img").first.attributes["src"]
caller_name = `curl #{image_url} > name.png 2> /dev/null && gocr name.png`
View gist:464605
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
View wordpressxml2jekyll.rb
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
require 'rubygems'
require 'hpricot'
require 'clothred'
You can’t perform that action at this time.