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
vows = require 'vows' | |
assert = require 'assert' | |
vows.describe("A Vow with teardown").addBatch | |
"A context": | |
topic: () -> | |
flag: true | |
"And a vow": (topic) -> | |
assert.isTrue(topic.flag) | |
teardown: (topic) -> |
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
assert = require 'assert' | |
vows = require 'vows' | |
tornDown = false | |
vows.describe('Vows with asynchronous teardowns').addBatch | |
'Context with long-running teardown': | |
'is run first': () -> | |
teardown: () -> | |
callback = @callback | |
setTimeout(() -> |
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
cat <<EOT >> bin/activate | |
for CMD in \`python -c 'from django.core import management; print " ".join(management.get_commands().keys())'\` | |
do | |
alias dj\${CMD}="django-admin.py \${CMD}" | |
done | |
EOT |
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 CMD in `python -c 'from django.core import management; print " ".join(management.get_commands().keys())'` | |
do | |
alias dj${CMD}="django-admin.py ${CMD}" | |
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
<project name="WikipediaMiner" default="dist" basedir="."> | |
<description> | |
simple example build file | |
</description> | |
<!-- set global properties for this build --> | |
<property name="src" location="src"/> | |
<property name="build" location="build"/> | |
<property name="dist" location="dist"/> | |
<property name="lib" location="lib"/> | |
<property name="test" location="test"/> |
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/python | |
# memcache_checker.py | |
# | |
# checks a list of memcache servers for a given key | |
# usage: memcache_checker.py <key> | |
import sys | |
import socket | |
# a list of (host, port) tuples |
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/python | |
import urllib | |
import urllib2 | |
import re | |
import sys | |
URL = 'http://tidypub.org/' | |
r = urllib2.urlopen(URL) | |
for l in r.readlines(): |
NewerOlder