Skip to content

Instantly share code, notes, and snippets.


Lee Packham leepa

Block or report user

Report or block leepa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:307846
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 61a2a2d..228e1d5 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -29,7 +29,12 @@ class Pathname
if src.is_a? Array
src.collect {|src| install src }
- raise "#{src} does not exist" unless File.exist? src
+ # if it's a symlink, don't resolve it to a file because if we are moving
View gist:422212
Dear Subject Name Here,
Aperture Science is pleased to inform you that we have partnered with Valve to announce the gala CANCELLATION of the June 14 Portal 2 event at the Regal Theater. The event will be replaced by a surprise. And even though the cancellation of the event certainly counts as a surprise, we are pleased to further announce that the cancellation of the event is not THE surprise. However, per International treaties regarding the definition of the word "surprise", of which both Aperture Science and Valve are signatories, the time, date and content of the actual surprise will only become available as you experience the surprise.
If you'd like to ask fruitless questions about the E3 Portal 2 surprise or, more fruitfully, schedule an appointment to attend a Portal 2 screening at the Valve booth during E3, please contact Valve's Special Envoy to Surprises, Doug Lombardi.
Thank you for **RECORD SCRATCH!!!**
PS: The surprising record scratch is also not the surprise.
View gist:442134
// ==UserScript==
// @name MPUK Forum Banner Head Removal
// @namespace
// @description Removes awful header thingy that people hate
// @include*
// ==/UserScript==
var allDivs, thisDiv;
allDivs = document.evaluate(
View gist:470925
>>> pprint.pprint(sysconfig.get_config_vars())
'AR': 'ar',
'ARFLAGS': 'rc',
'ASDLGEN': './Parser/',
'ASDLGEN_FILES': './Parser/ ./Parser/',
'AST_ASDL': './Parser/Python.asdl',
'AST_C': './Python/Python-ast.c',
'AST_C_DIR': './Python',
leepa / http.js
Created Jul 17, 2010
This is a slight mod on the original - it supports HTTPS and actually has error handling!
View http.js
// Express - HTTP - Copyright TJ Holowaychuk <> (MIT Licensed)
* Module dependencies.
var http = require('http'),
parse = require('url').parse,
queryString = require('querystring')
View gist:527780
➜ local git:(master) pwd
➜ local git:(master) brew install libgpg-error
Formula already installed: /usr/local/Cellar/libgpg-error/1.8
➜ local git:(master) brew install libgcrypt
Formula already installed: /usr/local/Cellar/libgcrypt/1.4.5
➜ local git:(master) brew install gnutls
==> Downloading
File already downloaded and cached to /Users/lpackham/Library/Caches/Homebrew
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gnutls/2.10.1 --disable-guile
View config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GnuTLS configure 2.10.1, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gnutls/2.10.1 --disable-guile
## --------- ##
## Platform. ##
View foo.rb
def normalize_version version, sep, max_width
version_split = version.split(sep)
output = ""
for s in version_split
output << sprintf('%' + max_width.to_s + 's', s)
v1 = '1.4.1'
View gist:729349
defaults write orientation -string top
killall Dock
View gist:764794
daemonize yes
pidfile /var/run/
logfile /var/log/redis.log
port 6379
timeout 300
loglevel notice
You can’t perform that action at this time.