#Web product guidelines
From @leahculver. Originally posted here.
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
#Web product guidelines
#!/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' |
:⌉ | |
=⌉ | |
¦-) as opposed to | | |
☺ | |
☹ | |
☻ | |
⍣ | |
⍤ | |
⍥ om nom nom | |
⍨ |
# 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` |
#!/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' |
#!/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' |
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/} |
#################################### | |
# 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 |
import urllib, mechanize | |
import time | |
import simplejson | |
import os | |
import sys | |
from multiprocessing import Pool | |
import pickle | |
#!/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] |