Skip to content

Instantly share code, notes, and snippets.

"""
Here's my sample Django settings for a project I recently did. Visit http://damonjablons.wordpress.com to see the explanation.
"""
import os
import socket
# Set DEBUG = True if on the production server
if socket.gethostname() == 'your.domain.com':
DEBUG = False
@alexvelin
alexvelin / notbash-parser.py
Created March 3, 2012 08:12 — forked from pyropeter/LICENSE
PKGBUILD parser
#!/usr/bin/env python2
# This is a parser for bash-style variable assignments.
# It fully (?) supports the syntax w/o braces, the ${}-syntax
# is implemented very hackish. (There are also detailed
# TODO-comments in various places)
# This is meant for Archlinux' AUR to be used to parse
# PKGBUILD's properly.
@alexvelin
alexvelin / create-lxc-container.sh
Created April 1, 2012 20:21 — forked from pklaus/create-lxc-container.sh
Automates the steps to set up LXC containers with virtualized environments on Ubuntu Linux
#!/bin/bash
### Bash Script that automates the steps to set up an LXC (Linux Container) boxed environment on Ubuntu Linux
### <http://blog.philippklaus.de/2011/01/container-virtualization-using-lxc-on-ubuntu/>
###
### More inspiration can be found in <https://github.com/phbaer/lxc-tools> and in
### <https://github.com/halcyon/lxc-tools/commit/b428a6973dd12b75c2400d41f60c454e752c10c6> and
### <http://mindref.blogspot.com/2011/01/debian-lxc-create.html>.
###
### Written by Philipp Klaus <philipp.l.klaus @ web.de>
"""
A redis autocomplete example for multi-word phrases.
Based on:
Ruby original: http://gist.github.com/574044
Python original: https://gist.github.com/577852
See options below for usage
Requires http://github.com/andymccurdy/redis-py/