This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, mechanize | |
import time | |
import simplejson | |
import os | |
import sys | |
from multiprocessing import Pool | |
import pickle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:⌉ | |
=⌉ | |
¦-) as opposed to | | |
☺ | |
☹ | |
☻ | |
⍣ | |
⍤ | |
⍥ om nom nom | |
⍨ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
NewerOlder