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
class RegexField(CharField): | |
def __init__(self, regex=None, *args, **kwargs): | |
self.regex = regex | |
super(CharField,self).__init__(*args, **kwargs) | |
def formfield(self, **kwargs): | |
from django import forms | |
defaults = { | |
'form_class': forms.RegexField, |
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
def _pofile_or_mofile(f, type, **kwargs): | |
# ... snip | |
default_klass = type == 'pofile' and POFile or MOFile | |
klass = kwargs.get('klass', default_klass) | |
parser = kls( | |
f, | |
encoding=enc, | |
check_for_duplicates=kwargs.get('check_for_duplicates', False), |
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
[2012-10-16 14:16:57,037: INFO/MainProcess] consumer: Connected to redis://localhost:6379/1. | |
[2012-10-16 14:16:57,047: ERROR/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection... | |
Traceback (most recent call last): | |
File "/srv/networklocum/lib/python2.6/site-packages/celery/worker/consumer.py", line 390, in start | |
self.consume_messages() | |
File "/srv/networklocum/lib/python2.6/site-packages/celery/worker/consumer.py", line 402, in consume_messages | |
with self.hub as hub: | |
File "/srv/networklocum/lib/python2.6/site-packages/celery/worker/hub.py", line 190, in __enter__ | |
self.init() | |
File "/srv/networklocum/lib/python2.6/site-packages/celery/worker/hub.py", line 144, in init |
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
INFO in views [/d/nllocationservice/location_service/views.py:113]: | |
Querying the database with: '{'loc': SON([('$near', [51.521706399999999, -0.072289300000000001]), ('$maxDistance', 0.28939372015627263)]), 'type': u'jobs'}' | |
-------------------------------------------------------------------------------- | |
2012-10-17 15:07:46 [2697] [ERROR] Error handling request | |
Traceback (most recent call last): | |
File "/home/administrator/.virtualenvs/nl-loc/lib/python2.6/site-packages/gunicorn/workers/sync.py", line 102, in handle_request | |
respiter = self.wsgi(environ, resp.start_response) | |
File "/home/administrator/.virtualenvs/nl-loc/lib/python2.6/site-packages/flask/app.py", line 1701, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/home/administrator/.virtualenvs/nl-loc/lib/python2.6/site-packages/flask/app.py", line 1689, in wsgi_app |
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
Error in migration: squawk:0005_auto__chg_field_transmissionlog_gateway_status__chg_field_transmission | |
Traceback (most recent call last): | |
File "./manage.py", line 31, in <module> | |
execute_manager(settings) | |
File "/home/administrator/.virtualenvs/nl-redflash/lib/python2.6/site-packages/django/core/management/__init__.py", line 459, in execute_manager | |
utility.execute() | |
File "/home/administrator/.virtualenvs/nl-redflash/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/home/administrator/.virtualenvs/nl-redflash/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv | |
self.execute(*args, **options.__dict__) |
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 validate_auth_urls(req, path, httpMethod) { | |
/* | |
* Ensure that only client API keys can access the auth urls | |
*/ | |
if (!path.startswith('/auth/')) { | |
return true | |
} |
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
// the below doesn't work when IE7's privacy settings are set to block 3rd party cookies | |
$('.got-question').click(function(){ | |
if (typeof(window.olark) !== "undefined") { | |
//olark is present | |
} | |
else { | |
//olark is absent | |
} | |
}); |
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
git for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads |
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
administrator@vagrant-craig:~$ ssh [email protected] | |
Hi craig! You've successfully authenticated, but GitHub does not provide shell access. | |
Connection to github.com closed. |
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
# Khan's machine | |
_add_platform( | |
'vagrant-khan', | |
custom_defaults=_DEV_DEFAULTS, | |
... |
OlderNewer