Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile
" Up
set t_ku=
" Down
set t_kd=
" Right
set t_kr=
" Left
set t_kl=

HOWTO: iPhone AT&T Tethering

In 10 steps:

  • Update iTunes to 8.2 via Software Update
  • Update your iPhone to the 3.0 release (out today - June 17th)
  • Download this dmg and mount it: tethering file
  • Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
  • Start up iTunes
@tomkersten
tomkersten / stats.rb
Created September 15, 2009 20:33 — forked from mojombo/stats.rb
# Run the given block +num+ times and then print out the mean, median, min,
# max, and stddev of the run. For example:
#
# irb> stats(10) { sleep(rand / 100) }
# mean: 5.99ms
# median: 6.76ms
# min: 1.49ms
# max: 9.28ms
# stddev: 2.54ms
def stats(num)
[alias]
co = checkout
ci = commit
st = status
br = branch
last = cat-file commit HEAD
[apply]
whitespace = nowarn
[merge]
tool = opendiff
require 'autotest/timestamp'
#require 'autotest/heckle'
#require 'autotest/redgreen'
require 'autotest/screen'
$VERBOSE=false
Autotest.add_hook :initialize do |autotest|
autotest.add_exception(/^\.\/vendor/)
autotest.add_exception(/^\.\/artwork/)
autotest.add_exception(/^\.\/public/)
@tomkersten
tomkersten / license
Created January 28, 2010 03:44 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
# Assume 2 branches named 'current' and 'master'
# Show me the commits I have in current, which are not in master
git log current..master --pretty=oneline
# Show me commits in master which are not in my current branch
git log master..current --pretty=oneline
# Show me stuff that people have pushed to 'master' which I don't have yet (we'll call it 'origin' in this case),

Poor Man's Deploy

  • Start a Sinatra server on port 4000
  • GET / to that server triggers a git pull and mod_rails restart
  • Hit port 4000 locally after pushing

Why?

Copy SSH public key to clipboard
#!/usr/bin/ruby
require 'rubygems'
require 'codefumes_harvester'
def ant_success?
ENV['ANT_RET'] == '0'
end
pub_key = ENV['CF_PUBLIC_KEY']