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
""" | |
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 |
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
#!/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. |
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/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> |
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
""" | |
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/ |