Skip to content

Instantly share code, notes, and snippets.

View leepa's full-sized avatar

Lee Packham leepa

View GitHub Profile
@leepa
leepa / .gitconfig
Created February 8, 2011 21:05
These files make up my global git config - it's basic but it makes life oh so simple
[user]
name = Lee Packham
email =
; Github details are teh awesome
;[github]
; user = leepa
; token = # Get this from your github.com profile
; Consider using diff tools - they are nice
@leepa
leepa / gist:818307
Created February 9, 2011 10:55
This is git-show-merges
#!/usr/bin/env ruby
## git-show-merges: a simple script to show you which topic branches have
## been merged into the current branch, and which haven't. (Or, specify
## the set of merge branches you're interested in on the command line.)
##
## git-show-merges Copyright 2008 William Morgan <wmorgan-git-wt-add@masanjin.net>.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or (at
@leepa
leepa / gist:874388
Created March 17, 2011 14:16
419 LOL MUCH
This is a personal email directed to you and I request that it be treated as such. I must solicit your Confidentiality and assure you that I am contacting you in good faith and this proposal will be of mutual benefit. I am James Kessler, a solicitor at law. I am the personal attorney/sole executor to the late Mr. Allan hereinafter referred to as my client who worked as an independent oil magnate in my country, who died in a car crash with his immediate family in East London on the 5Th of November 2007.
My late client a formal Sub-Comptroller working with Chevron Texaco Oil here in the United Kingdom and had Left behind a deposit of Five Million Six Hundred Thousand British Pounds Sterling only (£5.9 million) with a bank. After the death of my client, the finance company contacted me, as his attorney to provide his Next of kin who should inherit his fortune this according to them is their policy in sure circumstances.
Since the death of my client, I have written several letters to the embassy with intent to
@leepa
leepa / symbolizecrashlog.sh
Created May 1, 2011 10:33
Probably the most important shell script for an iOS developer...
#!/bin/bash
AWK_SCRIPT=/tmp/symbolizecrashlog_$$.awk
SH_SCRIPT=/tmp/symbolizecrashlog_$$.sh
if [[ $# < 2 ]]
then
echo "Usage: $0 [ -arch <arch> ] symbol-file [ crash.log, ... ]"
exit 1
fi
@leepa
leepa / fixinstallnames.sh
Created May 11, 2011 14:57
If you want to use WebKit on a bundled app - you want to use this
install_name_tool -change @executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui <PutExecutableHere>
install_name_tool -change @executable_path/../Frameworks/QtNetwork.framework/Versions/Current/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork <PutExecutableHere>
install_name_tool -change @executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore <PutExecutableHere>
dmesg
ad12: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=2639631104
ad12: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=2639631104
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526450
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526578
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526706
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176510659
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176510915
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176511171
➜ ~ zpool status
pool: smegdump
state: ONLINE
scrub: resilver completed after 7h29m with 0 errors on Thu Jul 28 02:04:46 2011
config:
NAME STATE READ WRITE CKSUM
smegdump ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ad8 ONLINE 0 0 0
ld: bad codegen, pointer diff in WebCore::JSDocument::JSDocument(JSC::Structure*, WebCore::JSDOMGlobalObject*, WTF::PassRefPtr<WebCore::Document>)to global weak symbol vtable for WebCore::JSDocumentfor architecture i386
➜ ~ brew versions memcached
1.4.13 git checkout 4cbb3f4 /usr/local/Library/Formula/memcached.rb
1.4.11 git checkout c2b8e87 /usr/local/Library/Formula/memcached.rb
1.4.10 git checkout b177294 /usr/local/Library/Formula/memcached.rb
1.4.9 git checkout d8b226c /usr/local/Library/Formula/memcached.rb
1.4.7 git checkout 7665fdc /usr/local/Library/Formula/memcached.rb
1.4.6 git checkout a840c4a /usr/local/Library/Formula/memcached.rb
1.4.5 git checkout 0476235 /usr/local/Library/Formula/memcached.rb
1.4.4 git checkout f99f0b4 /usr/local/Library/Formula/memcached.rb
1.4.0 git checkout 2b9f56d /usr/local/Library/Formula/memcached.rb
# Put me in .git/hooks/pre-commit for any Django projects you work on
# Make sure you have flake8 installed globally via 'pip install flake8'
ret_code=0
for file in $(git diff --name-only --cached $against)
do
if [ ! -z "$(grep 'DEBUGS' $file)" ]
then
echo "DEBUGS in file $file"