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
""" | |
Dump current deferred state. | |
> Anyway, given a tree of deferreds, this will produce a whatever.dot | |
> file, which can be fed to graphviz' "dot -Tpdf whatever.dot > | |
> whatever.pdf", >and the pdf has a rather nice-looking graph of the | |
> deferreds. | |
http://twistedmatrix.com/pipermail/twisted-python/2012-July/025867.html |
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 | |
# Start from the repository root. | |
cd ./$(git rev-parse --show-cdup) | |
# Delete .pyc files and empty directories. | |
echo "Deleting pyc files." | |
find . -name "*.pyc" -delete | |
find . -type d -empty -delete |
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 application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
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
# %(mysite)s - run %(mysite)s instances (default is the main production instance) | |
# | |
# This runs gunicorn-django for %(mysite)s; to install: | |
# * sudo ln -s <this file> /etc/init/%(mysite)s | |
# * sudo initctl reload-configuration | |
# | |
# it expects the following directory layout: | |
# | |
# /home/%(mysite)s/public_html | |
# \-env -> virtualenv |
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
""" | |
This fabric file makes setting up and deploying a django application much | |
easier, but it does make a few assumptions. Namely that you're using Git, | |
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
Django installed on your local machine and SSH installed on both the local | |
machine and any servers you want to deploy to. | |
_note that I've used the name project_name throughout this example. Replace | |
this with whatever your project is called._ |