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
var system = require("system"); | |
var url = system.args[1]; | |
require('./phantom-full-load')(phantom, url, function (page, logs) { | |
logs.forEach(function (i) { | |
console.log('> ' + i); | |
}); | |
result = page.evaluate(function () { | |
return $('body *').attr('class'); |
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
version: '2' | |
services: | |
db: | |
restart: always | |
image: postgres | |
environment: | |
- POSTGRES_USER=project | |
- POSTGRES_PASSWORD=project | |
volumes: |
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
Git hook post-merge and post-checkout for sync modification time to last commit time. | |
You can download scripts manually and install them yourself, or you can install it with command | |
> curl -s https://gist.githubusercontent.com/phpdude/9464925/raw/install | sh | |
This command will download post-merge script, chmod it, and create post-checkout symlink to post-merge hook. | |
You can also start this script manually with environment variable $GIT_MERGE_LIMIT=100 to updated timestamp of last 100 commits for example. |
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
fileTypes: [ | |
"apib" | |
] | |
foldingStartMarker: ''' | |
(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\\b.*?> | |
|<!--(?!.*-->) | |
|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/))) | |
) | |
''' |
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 celery import shared_task | |
from celery.contrib.methods import task_method | |
from django.core.mail.backends.smtp import EmailBackend as BaseEmailBackend | |
class FakeLock(object): | |
__enter__ = lambda x: None | |
__exit__ = lambda a, b, c, d: None | |
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.utils import translation | |
class LocaleByDomainMiddleware(): | |
def process_request(self, request): | |
host = request.META['HTTP_HOST'].lower() | |
locales = dict(settings.LOCALE_DOMAINS) | |
if not host in locales: |
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 | |
import requests | |
import re | |
from json import loads | |
from HTMLParser import HTMLParser | |
import shutil | |
from lxml.html import fromstring | |
from time import sleep |
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
find . -type d -name migrations -not -exec git check-ignore -q {} \; -exec git add {} \; |
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
GcsManager | |
Robot | |
WitInterface | |
WitResponse | |
XmppReporter | |
cjson | |
cloudsql | |
cloudsql.beans | |
cloudsql.dao | |
cloudsql.dao.dialogdao |
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
/** | |
* WkHtmlToPdf table splitting hack. | |
* | |
* Script to automatically split multiple-pages-spanning HTML tables for PDF | |
* generation using webkit. | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's | |
* page format. | |
* The tables you want to be automatically splitted when the page ends must | |
* have a class name of "splitForPrint" (can be changed). |