This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(for branch in $(git branch -l) ; do git archive $branch | tar -l ; done) | sort | uniq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for branch in $(git branch -r | grep -v HEAD) ; do git branch --track $(echo $branch | cut -f2- -d/) $branch ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ptr_inspect.c | |
Demonstration code; shows how to trace the system calls in a child | |
process with ptrace. Only works on 64-bit x86 Linux for now, I'm | |
afraid. (Even worse, it's only tested on Linux 2.6....) | |
The callname() function looks clunky and machine-generated because it | |
*is* clunky and machine-generated. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
addmint.py | |
Adds Mint analytics to a static HTML page; requires BeautifulSoup. | |
(I use this for Aperture exports.) | |
Created by Will Benton on 2008-07-15. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# you probably want automatic git-gc before running this: | |
# git config --global gc.auto 1 | |
mkdir jikesrvm.svn.sourceforge.net | |
(cd jikesrvm.svn.sourceforge.net && rsync -avz jikesrvm.svn.sourceforge.net::svn/jikesrvm/\* .) | |
git svn clone -s file://$(pwd)/jikesrvm.svn.sourceforge.net/rvmroot/ jikesrvm.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python - << EOF | |
import sys | |
vtup = sys.version_info | |
version = vtup[0] * 100 + vtup[1] * 10 + vtup[2] | |
if version < 240: | |
sys.exit(1) | |
sys.exit(0) | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Simple timing test of exec-ing versus embedding python interpreter. | |
Note that to embed python programs with dynamically loaded extension | |
modules, you'll need to do some special linking tricks: | |
http://www.python.org/doc/2.5.2/ext/link-reqs.html | |
Compile this file with something like: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert sda.img to a QEMU disk image | |
qemu-img convert -f raw sda.img -O qcow sda-qcow.img | |
# convert sda.img to a vmware disk image | |
qemu-img convert -f raw sda.img -O vmdk sda.vmdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
#include <iostream> | |
#include <list> | |
#include <tr1/memory> | |
class repr { | |
public: | |
virtual ~repr() { } |
OlderNewer