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/bash | |
PREVPWD=`pwd` | |
PREVENV_PATH= | |
PREV_PS1= | |
PREV_PATH= | |
handle_virtualenv(){ | |
if [ "$PWD" != "$PREVPWD" ]; then | |
PREVPWD="$PWD"; |
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/bash | |
OPTS=--rest | |
MONGO=/opt/local/bin/mongod | |
DBPATH=/opt/local/data/db | |
PIDFILE=/var/run/mongo.pid | |
IP=127.0.0.1 | |
LOGS=/var/log/mongo.log | |
case $1 in |
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
""" | |
Webasset filter to combine JQuery Templates files into javascript-safe strings, | |
and put them into a namespace | |
""" | |
import os | |
from webassets.filter import Filter | |
class JqtFilter(Filter): | |
name = 'jqt' |
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
SHELL=/bin/bash | |
DST_ID=avocadodb | |
REPO=git://github.com/triAGENS/AvocadoDB.git | |
# defaults | |
BASE_DIR=$(HOME)/_build/$(DST_ID) | |
DST_DIR=/usr/local/_build/$(DST_ID) | |
DB_DIR=/tmp/vocabase |
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
def setup(sphinx): | |
from pygson.json_lexer import JSONLexer | |
sphinx.add_lexer("json", JSONLexer()) |
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
sys.path.insert(0, os.path.join(os.path.abspath('.'), "ext")) |
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
class PubSub(object): | |
""" | |
Very simple Pub/Sub pattern wrapper | |
using simplified Redis Pub/Sub functionality. | |
Usage (publisher):: | |
import redis | |
r = redis.Redis() |
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
import sys | |
import time | |
from datetime import datetime | |
from arango import create | |
from arango.document import Document | |
from arango.clients import Client | |
try: |
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
var n = 1000, cn = "testdocs_js"; | |
db._drop(cn); db._create(cn); var c = db._collection(cn); | |
var t = new Date(); for (var i = 0; i < n; ++i) { c.save({ "value" : "test_" + i }); }; var e = new Date(); | |
e.getMilliseconds() - t.getMilliseconds(); |
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 | |
import argparse | |
import json | |
import sys | |
import StringIO | |
import couchdb | |
OlderNewer