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
From 61dfc697ea2ca60218518e319f9b20fb973c0ee3 Mon Sep 17 00:00:00 2001 | |
From: Justin Quick <justquick@gmail.com> | |
Date: Sat, 6 Aug 2011 17:45:45 -0400 | |
Subject: [PATCH] start of selenium test suite with runselenium management command. | |
runtime options are set by SELENIUM_CONFIG so we can test in different environments easily | |
--- | |
apps/sel/management/commands/runselenium.py | 9 +++++++++ | |
requirements.txt | 1 + | |
settings.py | 3 ++- |
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 filter(callback, array){ | |
// Given a callback function taking one argument and an array, | |
// return a new array of items passing the callback check. | |
// The callback function is called once per item in the array and must return true/false. | |
var ra = new Array(); | |
for(var i in array){ | |
if (callback(array[i])) | |
ra.push(array[i]); | |
} | |
return ra; |
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
From a819adabae87570827c475a0ad0d556f9b1e8517 Mon Sep 17 00:00:00 2001 | |
From: Justin Quick <justquick@gmail.com> | |
Date: Sun, 24 Jul 2011 13:09:43 -0400 | |
Subject: [PATCH] fixed import loop errors in endless pag | |
--- | |
apps/endless_pagination/models.py | 11 ++++++----- | |
1 files changed, 6 insertions(+), 5 deletions(-) | |
diff --git a/apps/endless_pagination/models.py b/apps/endless_pagination/models.py |
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 | |
import sys | |
from fabric.api import abort, run, sudo, env, cd | |
from fabric.colors import red, green | |
from fabric.contrib.files import exists, put, upload_template | |
ROOT = '/home/jquick/code/' | |
WORKON = '/home/jquick/.virtualenvs' | |
VENVS = { |
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
Jquick7490MLA:force jquick$ mkvirtualenv force | |
Traceback (most recent call last): | |
File "/usr/local/bin/virtualenv", line 8, in <module> | |
load_entry_point('virtualenv==1.5.1', 'console_scripts', 'virtualenv')() | |
File "/Library/Python/2.6/site-packages/virtualenv.py", line 558, in main | |
prompt=options.prompt) | |
File "/Library/Python/2.6/site-packages/virtualenv.py", line 647, in create_environment | |
site_packages=site_packages, clear=clear)) | |
File "/Library/Python/2.6/site-packages/virtualenv.py", line 771, in install_python | |
copy_required_modules(home_dir) |
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
<html> | |
<head> | |
<script type="text/javascript">; | |
function mainLoop(){ | |
ctx.clearRect(0,0,500,410); | |
playerPaddle.shape() | |
enemyPaddle.shape() | |
ball1.drawBall() | |
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
from django.conf import settings | |
from django.db.models import get_models, FileField | |
from django.core.files.storage import get_storage_class | |
STORAGE = get_storage_class(getattr(settings, "STORAGE", settings.DEFAULT_FILE_STORAGE)) | |
for model in get_models(): | |
for field in model._meta.fields: | |
if isinstance(field, FileField) and not isinstance(field.storage, STORAGE): | |
FileField(verbose_name=field.verbose_name, upload_to=field.upload_to, name=field.name).\ |
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
NATIVE_LIBRARY = { | |
'function':{ 'add': lambda x, y: x + y }, | |
'comparison':{ 'is_in': lambda x, y: x in y }, | |
... | |
} | |
NATIVE_TAGS = ( | |
'native_tags.contrib.hash', | |
'native_tags.contrib.serializers', |
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 do_add(x, y): | |
return x + y | |
do_add.function = True | |
do_add.name = 'add' | |
{% add 1 9 as ten %} | |
1 + 9 = {{ ten }} | |
def less(x, y): | |
return x < y |
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
{% ifnotequal blog.slug "belief-blog" %} | |
{% ifnotequal blog.slug "bellantoni" %} | |
{% ifnotequal blog.slug "billups" %} | |
{% ifnotequal blog.slug "blog-rings" %} | |
{% ifnotequal blog.slug "chatter" %} | |
{% ifnotequal blog.slug "d1scourse" %} | |
{% ifnotequal blog.slug "dinan" %} | |
{% ifnotequal blog.slug "fishwrap" %} | |
{% ifnotequal blog.slug "in-the-room" %} |