Skip to content

Instantly share code, notes, and snippets.

@dustin
dustin / post-receive-email.sh
Created December 4, 2008 20:33
Old post-receive email script I used at caring.com
#!/bin/sh
#
# Copyright (c) 2007 Andy Parkins
#
# An example hook script to mail out commit update information. This hook
# sends emails listing new revisions to the repository introduced by the
# change being reported. The rule is that (for branch updates) each commit
# will appear on one email and one email only.
#
# This hook is stored in the contrib/hooks directory. Your distribution
@dustin
dustin / no-reserved-words.rb
Created December 17, 2008 21:28
Playing around with reserved words. Ruby doesn't seem to care.
#!/usr/bin/env ruby -w
class O
def yield
puts "Yielded."
end
def do
puts "Doing."
end
def def
@dustin
dustin / autolinks.html
Created December 24, 2008 08:00
HTML to generate an HTML list of related links for you.
#!/usr/bin/env python
import random
if __name__ == '__main__':
colors=('red', 'green', 'yellow', 'blue')
limbs=('left foot', 'right foot', 'left hand', 'right hand')
print random.choice(limbs), random.choice(colors)
# moved to http://gist.github.com/41462
def whack(objects)
Hash[ *objects.map{|o| [o.send('table_name'), o.send('delete_all')]}.flatten]
end
@dustin
dustin / gist:41462
Created December 30, 2008 00:48 — forked from damon/gist:41453
def whack(objects)
Hash[*objects.map{|o| [o.send('table_name'), o.send('delete_all')]}.flatten]
end
# or (depending on what "send" means there)
def whack(objects)
Hash[*objects.map{|o| [o.table_name, o.delete_all]}.flatten]
end
@dustin
dustin / net.spy.boxee.plist
Created January 25, 2009 20:36
Keep Boxee running.
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.spy.boxee</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-W</string>
@dustin
dustin / mc-1.3.2-release-notes.txt
Created March 11, 2009 19:17
Release Notes for Memcached 1.3 beta 2
Memcached 1.3 Beta 2 Release Notes
==================================
Date: 2009-03-11 Wed
Table of Contents
=================
1 New Features
1.1 Binary Protocol
commit e703ce4cb0b0ee8034ba9c2331877a97ffb6d11a
Author: Dustin Sallings <dustin@spy.net>
Date: Mon Jan 19 23:45:38 2009 +0000
Build fixes for ubuntu 8.10/64.
gcc seems to have been wise to all of the syscalls being cast to void
to avoid doing real result checking in unlikely errors.
commit 5a44468708aa09fcec469557258a5d69a88811ca
.__ ___. .__ __ .__ .___
| |__ _____ ______ ______ ___.__. \_ |__ |__|_______ _/ |_ | |__ __| _/_____ ___.__.
| | \ \__ \ \____ \ \____ \< | | | __ \ | |\_ __ \\ __\| | \ / __ | \__ \ < | |
| Y \ / __ \_| |_> >| |_> >\___ | | \_\ \| | | | \/ | | | Y \/ /_/ | / __ \_\___ |
|___| /(____ /| __/ | __/ / ____| |___ /|__| |__| |__| |___| /\____ | (____ // ____|
\/ \/ |__| |__| \/ \/ \/ \/ \/ \/
_____ ___ ___ ___ ___ ___
/ /::\ / /\ / /\ /__/\ /__/\ /__/| ___
/ /:/\:\ / /:/_ / /:/_ \ \:\ \ \:\ | |:| / /\
/ /:/ \:\ / /:/ /\ / /:/ /\ \ \:\ \ \:\ | |:| / /:/