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
.foo { | |
p { color: #333; text-align: rtl(right, left); } | |
} | |
// Output | |
.foo p { color: #333; text-align: left; } | |
html[dir="rtl"] .foo p { text-align: right; } |
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
function toMatrix(transform) { | |
var transforms = transform.split(' '), | |
matrix = Raphael.matrix(); | |
for (var i=0; i<transforms.length; i++) { | |
var match = /^(\w+)\((.+)\)$/.exec(transforms[i]), | |
tranform = match[1], | |
values = toFloatArray(match[2]); | |
if ('translate' === transform) matrix.translate.apply(matrix, values); |
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 celery import task | |
class AsyncTaskMiddleware(object): | |
""" | |
Dynamically adds an async task queue to the request to be executed when the | |
response is processed. | |
All tasks added to the request are executed using a single asynchronous celery task. | |
Once the task is executed, it will execute each individual task in its own celery | |
task. |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<head> | |
<!--[if lte IE 8]><script src="../r2d3.v2.js"></script><![endif]--> | |
<!--[if gte IE 9]><!--> | |
<script src="../lib/d3/d3.v2.js"></script> | |
<!--<![endif]--> | |
</head> | |
<body><div id="pyramidDiagram"></div></body> | |
<script> |
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
PIPELINE_LESS_ARGUMENTS = '--include-path=' + ':'.join([ | |
'{0}/static/less'.format(app_module.filename) | |
for app_module in [pkgutil.get_loader(app) for app in INSTALLED_APPS] | |
]) | |
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
<% start_date = date.beginning_of_month.beginning_of_week - 1.day %> | |
<% end_of_month = date.end_of_month.end_of_week %> | |
<% weeks = (start_date...end_of_month).each_slice(7).to_a %> | |
<table> | |
<thead> | |
<% (0..6).each do |i| %> | |
<th><%= (start_date + i.days).strftime('%a') %></th> | |
<% end %> | |
</thead> |
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 django.core.management import base | |
from django.core.cache import get_cache | |
from django.conf import settings | |
from django.core.management import call_command | |
import StringIO | |
import re | |
import urls |