Skip to content

Instantly share code, notes, and snippets.

🌊
ride the wave

Harper Reed harperreed

View GitHub Profile
View Web product guidelines.md

#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
View my .screenrc
# based off of http://wearehugh.com/public/2007/03/screenrc
# and http://diveintomark.org/archives/2007/03/15/good-easy-2007
# ~/.screenrc
# UTF-8 everywhere
defutf8 on
# disable Ctrl-S/Ctrl-Q "flow control"
View rtorrent.rc
scgi_local = /tmp/rpc.socket
#encoding_list = UTF-8
min_peers = 40
max_peers = 100
min_peers_seed = 10
max_peers_seed = 50
max_uploads = 15
upload_rate =50
directory =/home/torrents/torrents/doing
session = /home/torrents/.rtsession
View blogstore_helper.py
"""
A helper for the app engine blobstore API and Django.
Works with the appengine patch:
http://code.google.com/p/app-engine-patch/
Taken and inspired by:
http://appengine-cookbook.appspot.com/recipe/blobstore-get_uploads-helper-function-for-django-request/
Usage:
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'
View gist:464605
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
View notifo_to_google_voice.php
<?php
/*
Easy to use sms notifications from Notifo
Super quick hack by Harper - @harper - harper@nata2.org
First:
--------------
Get Google-Voice-PHP-API:
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`
@harperreed
harperreed / create_custom_origin.py
Created Jan 14, 2011
creates a custom origin for cloudfront. EASY CDN!
View create_custom_origin.py
import boto
# requires cf_customorigin branch
# https://github.com/boto/boto/tree/cf_customorigin
origin_domain = 'www.example.org'
cdn_cname = ['media.example.org']
caller_reference = 'exmaple Distribution'
c = boto.connect_cloudfront()
d = c.create_custom_distribution(
@harperreed
harperreed / WBSAPI.php
Created Feb 1, 2011
Withings API php shell script for syncing to DB or whatever
View WBSAPI.php
<?
define ('pound',0.453592);
define ('inch', 0.0254);
function CurlCall ( $service , &$result=null )
{
try {
$s = curl_init();
curl_setopt($s,CURLOPT_URL,MYWBSAPIURL.$service);
You can’t perform that action at this time.