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 | |
vfile=$1 | |
for line in `cat ${vfile}`; do | |
gem=${line%%=*} | |
version=${line##*=} | |
if gem list | grep ${gem} | grep "(${version})"; then | |
echo "${gem} (${version}) is already installed" | |
else | |
gem install ${gem} -v ${version} --no-rdoc --no-ri | |
fi |
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 paginate(ctx_name): | |
""" | |
View decorator that handles pagination of a ListObject. Expects to find it | |
in the TemplateResponse context under the name ``ctx_name``. | |
This needs to not force delivery of the ListObject. | |
""" | |
def decorator(view_func): | |
@wraps(view_func) |
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
--- a/virtualenv.py | |
+++ b/virtualenv.py | |
@@ -867,5 +867,5 @@ | |
files['activate'] = ACTIVATE_SH | |
else: | |
- files = {'activate': ACTIVATE_SH} | |
+ files = {'activate': ACTIVATE_SH, 'activate.csh': ACTIVATE_CSH} | |
files['activate_this.py'] = ACTIVATE_THIS | |
for name, content in files.items(): | |
@@ -1426,4 +1426,29 @@ |
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 unwrap_template_syntax_error(function, *unwrap_exceptions): | |
""" | |
A decorator to catch TemplateSyntaxError and unwrap it, reraising the | |
wrapped exception. | |
If unwrap_exceptions are passed, the unwrapping will only occur if the | |
wrapped exception is one of those exception types. | |
""" | |
@wraps(function) |
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 os, sys, site | |
base = os.path.dirname(os.path.dirname(__file__)) | |
project = os.path.join(base, 'project') | |
virtenv = os.path.join(base, 'env') | |
### virtual environment, with precedence over global env ### | |
# from http://code.google.com/p/modwsgi/wiki/VirtualEnvironments |
NewerOlder