This file contains hidden or 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
import mogo | |
DBNAME1 = "__testing__" | |
DBNAME2 = "__testing2__" | |
# Basic model | |
class Person(mogo.Model): | |
name = mogo.Field(unicode) | |
# Automatically opens and closes DB connection (or should) |
This file contains hidden or 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 > /etc/apt/preferences.d/backports <<EOF | |
Package: puppet puppet-common puppetmaster facter | |
Pin: release a=lenny-backports | |
Pin-Priority: 900 | |
EOF | |
cat > /etc/apt/sources.list.d/backports.list <<EOF | |
deb http://backports.debian.org/squeeze-backports squeeze-backports main contrib non-free | |
EOF |
This file contains hidden or 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 | |
# if you run this for anything other than local tests you are making poor | |
# choices. also, make sure you use safe=True / wc=1 in your tests, or you'll | |
# get consistency issues | |
mongod --nojournal --noprealloc --smallfiles --dbpath /Volumes/RAM\ Disk/ |
This file contains hidden or 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
from cassandra.cluster import Cluster, OperationTimedOut | |
from cassandra.decoder import SyntaxException | |
from tornado.concurrent import Future | |
from tornado.testing import AsyncTestCase, gen_test | |
class TornadoCassandra(object): | |
def __init__(self, session, ioloop): |
OlderNewer