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
cat /proc/version |
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
# -*- coding: utf-8 -*- | |
''' | |
Borrowed from Django CMS. This is too useful to live without | |
''' | |
from django.conf import settings | |
class NULL: | |
pass |
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
/* ----------------------- | |
clearfix | |
from http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack/ | |
*/ | |
.group:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; |
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
United States: 71.170.*.* | |
Canada: 24.36.0.* | |
United Kingdom: 82.0.*.* | |
Australia: 203.19.*.* | |
South Korea: 112.175.246.* |
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
# Using a lambda to sort a list of structured data in Python | |
sorted(list_o_stuff, key=lambda k: k.key) |
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
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py | |
index ffce4cb..5f51fd8 100644 | |
--- a/tests/modeltests/basic/models.py | |
+++ b/tests/modeltests/basic/models.py | |
@@ -15,411 +15,3 @@ class Article(models.Model): | |
def __unicode__(self): | |
return self.headline | |
- | |
-__test__ = {'API_TESTS': """ |
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
/* cross-browser opacity ------------------*/ | |
selector { | |
filter: alpha(opacity=40); /* ie */ | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; /* ie8 */ | |
opacity: 0.8; | |
} |
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/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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
from datetime import date | |
import unittest | |
def calculate_age(birth_date, until=None): | |
""" | |
Calculates the age of a person from their birth date to a given | |
date, accounting for birth dates during leap year. The date | |
defaults to today if no date is specified. | |
""" |
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
# Run Django test suite | |
svn co http://code.djangoproject.com/svn/django/trunk/ django_src | |
cd django_src | |
echo "DATABASE_ENGINE = 'sqlite3'" > settings.py | |
PYTHONPATH=`pwd` ./tests/runtests.py --settings=settings -v1 |