Skip to content

Instantly share code, notes, and snippets.

Chris Adams acdha

Block or report user

Report or block acdha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
acdha /
Last active Aug 29, 2015
django-haystack's update_index command extended to activate translations
# encoding: utf-8
"""Haystack's update_index command extended to activate translations
from __future__ import absolute_import
from django.utils import translation
acdha / ie8.patch
Created Feb 4, 2014
Partial Intl.js patch for IE8 support
View ie8.patch
diff --git a/public_website/static/external/intl/Intl.js b/public_website/static/external/intl/Intl.js
index a86c1f3..65befab 100644
--- a/public_website/static/external/intl/Intl.js
+++ b/public_website/static/external/intl/Intl.js
@@ -25,23 +25,30 @@
})(typeof global !== 'undefined' ? global : this, function() {
"use strict";
- Intl = {},
acdha / create-github-milestones
Last active Aug 29, 2015
Script to create Github milestones for recurring release windows
View create-github-milestones
#!/usr/bin/env python
"""Create date-based release milestones on Github
By default this created milestones of the form 'Public Website – DATE'
If your git config defines github.user / github.password settings these will be used rather than prompting
for credentials. For sanity, !-prefixed github.password entries are supported so you can e.g. query the
OS X keychain rather than hard-coding passwords in a text file.
acdha / count-page-domains.js
Last active Aug 29, 2015
Count the number of domains used to load a page (see
View count-page-domains.js
/* global phantom */
// Inspired by
"use strict";
var system = require('system'),
webPage = require('webpage');
if (system.args.length != 2) {
console.log('Usage:', system.args[0], 'URL');
acdha / .jshintrc
Last active Aug 29, 2015
WDL's JSHint config
View .jshintrc
"maxlen": 110,
"indent": 4,
"strict": true,
"browser": true,
"bitwise": true,
"camelcase": true,
"curly": true,
acdha / postactivate
Created Mar 12, 2014
Global virtualenvwrapper hooks which add a project's bin directory to the PATH any time you activate a virtualenv
View postactivate
# This hook is run after every virtualenv is activated.
if [ -d "$VIRTUALENV_PROJECT/bin" ]; then
View jpylyzer.xml
<?xml version='1.0' encoding='UTF-8'?>
<jpylyzer xmlns:dc="" xmlns:rdf="">
View homebrew.mxcl.elasticsearch.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
acdha / testlog.js
Last active Aug 29, 2015
Performance test-case for pure-CSS expanding sidebar panel. WebKit, and to a lesser extent Blink, browsers render the sidebar expansion slower than expected, with repeated full invalidate/layout/recalc style cycles during the state change. This isn't too bad on a desktop but is noticeable on a mobile browser:…
View testlog.js
// Load testcase & connect WebInspector to an iPhone 4S running iOS 7.1.1
// Start timeline capture
// Expand the sidebar:
document.querySelector('input[type=checkbox]').checked = !document.querySelector('input[type=checkbox]').checked
// Timeline profile:
// Collapse the sidebar:
You can’t perform that action at this time.