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
apt-get install zlib1g-dev | |
apt-get install g++ | |
export VENV=$VIRTUAL_ENV | |
mkdir $VENV/packages && cd $VENV/packages | |
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz | |
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz | |
tar xzvf xapian-core-1.0.16.tar.gz |
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
# -*- coding: utf-8 -*- |
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
BeautifulSoup==3.1.0.1 | |
http://dist.repoze.org/PIL-1.1.6.tar.gz | |
django-debug-toolbar | |
-e svn+http://code.djangoproject.com/svn/django/trunk/#egg=django | |
-e hg+http://bitbucket.org/offline/django-annoying/#egg=django-annoying | |
-e git://github.com/alex/django-templatetag-sugar.git@#egg=django-templatetag-sugar | |
-e hg+http://bitbucket.org/andrewgodwin/south/#egg=south | |
-e git+git://github.com/django-extensions/django-extensions.git#egg=django-extensions |
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 MyMax(Aggregate): | |
sql_function = 'CHAR_LENGTH' | |
"""A base class to make it easy for end users to define their own | |
custom SQL aggregates. | |
The subclass should define the following two class properties: | |
* sql_function - the name of the SQL function to invoke | |
Optionally, you can define | |
* sql_template - a format string that is used to compose the |
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
/** | |
* reverseText plugin for jQuery | |
* v1.0 | |
* Reverses text within the selected nodes. | |
* | |
* By Craig Buckler, Optimalworks.net | |
* | |
* As featured on SitePoint.com | |
* Please use as you wish at your own risk. | |
*/ |
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
Index: lib/helper/AssetHelper.php | |
=================================================================== | |
--- lib/helper/AssetHelper.php (revision 15043) | |
+++ lib/helper/AssetHelper.php (working copy) | |
@@ -159,11 +159,23 @@ | |
$sourceOptions = (func_num_args() > 1 && is_array($sources[func_num_args() - 1])) ? array_pop($sources) : array(); | |
$html = ''; | |
+ | |
+ $before = ''; |
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
(function($) { | |
// marqGallery plugin $('ul_id').marqGallery({speed:2000}) | |
$.fn.marqGallery = function(params) { | |
params = $.extend({speed:2000}, params); | |
// traverse all nodes | |
this.each(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
#!/bin/bash | |
LIB_NAME=mylib | |
LIB_PREFIX=~/opt/mylib-0.1 | |
export DYLD_LIBRARY_PATH=$LIB_PREFIX/lib:$DYLD_LIBRARY_PATH | |
export LD_LIBRARY_PATH=$LIB_PREFIX/lib:$LD_LIBRARY_PATH | |
export C_INCLUDE_PATH=$LIB_PREFIX/include | |
export ACLOCAL_PATH=$LIB_PREFIX/share/aclocal | |
export PKG_CONFIG_PATH=$LIB_PREFIX/lib/pkgconfig | |
PATH=$LIB_PREFIX/bin:$PATH | |
PS1="[custom lib shell] \w @ " |
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
# name it something like mysitedotcom_wsgi | |
# /usr/bin/uwsgi -s 127.0.0.1:46235 -t 10 -M -p 1 -C -w mysitedotcom_wsgi -H ~/venvs/virtualenv | |
import sys, os | |
import django.core.handlers.wsgi | |
# lets redirect print statements to stderr | |
# (this is useful to redirect print statements to web servers error log file) | |
sys.stdout = sys.stderr |
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/python | |
import os, sys, subprocess | |
from pyinotify import * | |
# the watch manager stores the watches and provide operations on watches | |
wm = WatchManager() | |
# watched events | |
mask = IN_DELETE | IN_CREATE | IN_MODIFY |
OlderNewer