Public Gists by willb

Gravatar
Wed Nov 04 06:30:15 -0800 2009
1
2
3
require 'spqr/spqr'
require 'spqr/app'
require 'logger'
Gravatar
Wed Oct 21 13:03:00 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# This code crashes ruby 1.8.6 in Fedora 11 and 12.
Gravatar
Tue Oct 20 12:38:27 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# Why does this crash ruby 1.8.6 in Fedora 11 and 12?
Gravatar
Wed Oct 14 14:11:36 -0700 2009
1
2
3
#!/bin/bash
 
# Run git-tidy instead of "git clean" to keep from shooting yourself
Gravatar
Wed Sep 30 06:59:37 -0700 2009
1
2
3
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000f3f000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Gravatar
Mon Aug 31 10:44:48 -0700 2009
1
2
3
git clone http://git.apache.org/qpid.git/ qpid
cd qpid
for branch in $(git branch -r | grep -v master) ; do git branch --track $(echo $branch | cut -f2- -d/) $branch ; done
Gravatar
Wed Aug 19 21:54:09 -0700 2009
1
2
3
Preheat a griddle over a MEDIUM-HOT BURNER. Soften 2 TBSP BUTTER
(or use PEANUT or CANOLA OIL, which you will not need to soften).
 
Gravatar
Thu Aug 06 14:19:01 -0700 2009
1
2
3
#include <stdio.h>
#include <string.h>
#include <unistd.h>
Gravatar
Sat Jul 25 23:16:42 -0700 2009
1
2
3
/*
   midtest.m
   example OS X CoreMIDI code; generates an unattractive stream of random notes
gist: 149413 This little script uses the...
Gravatar
Fri Jul 17 21:43:07 -0700 2009
1
2
3
#!/usr/bin/env python
 
# geo-ip.py uses the geobytes.com API to find the probable
Gravatar
Thu Jul 09 08:33:51 -0700 2009
1
2
3
class ord_dict(dict):
    """ ord_dict is a dict that remembers the order in which its keys were originally inserted"""
    def __init__(self):
Gravatar
Wed Jul 01 13:00:19 -0700 2009
1
2
3
// Trivial example of using virtual dispatch to hide template parameters from clients, as
// alluded to here: http://chapeau.freevariable.com/2009/06/a-problem-of-dependent-types.html
 
Gravatar
Thu Mar 26 13:56:37 -0700 2009
1
2
3
# convert sda.img to a QEMU disk image
qemu-img convert -f raw sda.img -O qcow sda-qcow.img
 
Gravatar
Thu Mar 26 13:41:53 -0700 2009
1
2
# bit-for-bit copy of the drive at /dev/sda to sda.img on a removable disk
dd if=/dev/sda of=/media/removable/sda.img bs=1024
Gravatar
Fri Mar 20 10:35:37 -0700 2009
1
2
3
/*
 
Simple timing test of exec-ing versus embedding python interpreter.
Gravatar
Wed Dec 03 18:34:14 -0800 2008
1
2
3
python - << EOF
import sys
vtup = sys.version_info
Gravatar
Sat Oct 04 13:05:47 -0700 2008
1
2
3
#!/bin/sh
 
# you probably want automatic git-gc before running this:
Gravatar
Thu Oct 02 21:03:28 -0700 2008
1
2
3
#!/usr/bin/env python
# encoding: utf-8
"""
gist: 14488 This is some example code s...
Gravatar
Thu Oct 02 18:57:14 -0700 2008
1
2
3
/*
  ptr_inspect.c
 
Gravatar
Tue Sep 23 08:02:21 -0700 2008
1
for branch in $(git branch -r | grep -v HEAD) ; do git branch --track $(echo $branch | cut -f2- -d/) $branch ; done