Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
def new
#send .nil? then you can stub that on @billing_information
if !user.billing_information.nil?
user.build_billing_information
user.billing_information.first_name = user.first_name
user.billing_information.last_name = user.last_name
user.billing_information.postal_code = user.profile.postal_code
end
define_subscription_details
end
#!/usr/bin/env python
from optparse import OptionParser
import os, sys, string
from cStringIO import StringIO
import urllib2, urllib, subprocess, pprint
optparser = OptionParser("usage: %prog [-p] file1 file2 file3\n\nPass files to me and I'll post them to http://gist.github.com")
optparser.set_defaults(gistread="", debug=False)
optparser.add_option( "-p", "--private",
#!/usr/bin/perl
$pid = 0;
open I, "ps -axww -U $ENV{'USER'} |";
while (<I>)
{
if (/Aquamacs Emacs/ && !/grep/)
{
#!/usr/bin/env python
from optparse import OptionParser
import os, sys, string
from cStringIO import StringIO
import urllib2, urllib, subprocess, pprint
optparser = OptionParser("usage: %prog [-p] file1 file2 file3\n\nPass files to me and I'll post them to http://gist.github.com")
optparser.set_defaults(gistread="", debug=False)
optparser.add_option( "-p", "--private",
require 'rubygems'
require 'irb/completion'
require 'irb/ext/save-history'
require 'utility_belt'
IRB.conf[:SAVE_HISTORY] = 300
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
IRB.conf[:PROMPT_MODE] = :SIMPLE
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
" 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