- Tape
- Mirror caps
- Spanner to undo mirrors
- 14mm Spanner + screwdriver for suspension adjusting + owners handbook
- Oil (500ml between the two of us?)
- pressure gauge
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
()> app git:(master) ✗ ipython | |
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 0.13.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
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
def extract_locale(flask_globals): | |
def f(endpoint, values): | |
flask_globals.locale = values.pop('locale', None) if values else localise() | |
return f |
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
# beware... | |
def some_func(): | |
return lambda x: x['foo'] == 'bar' | |
# somewhere else... | |
filter(some_func, some_iterable) |
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 jinja2 import BytecodeCache | |
class RedisTemplateBytecodeCache(BytecodeCache): | |
'''Implements a Jinja2 bytecode cache on top of a pyredis.StrictRedis | |
connection | |
See: http://jinja.pocoo.org/docs/2.10/api/#bytecode-cache | |
''' | |
def __init__(self, redis_cnx, template_cache_key_prefix=None, ttl=86400): |
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
<?php | |
class ReportableHTTPGeocodingFailure extends Exception {} | |
class HTTPGeocodingFailure extends Exception {} | |
class GeoLocation { | |
function __construct($lng, $lat) { | |
$this->lng = $lng; | |
$this->lat = $lat; | |
} |
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
#!/usr/bin/env bash | |
sudo pip install pygments simplejson | |
echo "alias ppjson='python -c \"import simplejson; import sys; print simplejson.dumps(simplejson.loads(sys.stdin.read()), indent=4)\" | pygmentize -f console -l js'" >> ~/.bash_profile |
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 infinite_scroll_config = { | |
binder: $(window), | |
el: '.infinite-scroll', | |
offset: 750, | |
in_req: false, | |
at_end: false | |
}; | |
var infinite_scroll = function () { |
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
$.fn.slideTo = function(data) { | |
var width = parseInt($('#slider').css('width')); | |
var transfer = $('<div class="transfer"></div>').css({ 'width': (2 * width) + 'px' }); | |
var current = $('<div class="current"></div>').css({ 'width': width + 'px', 'left': '0', 'float': 'left' }).html($('#slider').html()); | |
var next = $('<div class="next"></div>').css({ 'width': width + 'px', 'left': width + 'px', 'float': 'left' }).html(data); | |
transfer.append(current).append(next); | |
$('#slider').html('').append(transfer); | |
transfer.animate({ 'margin-left': '-' + width + 'px' }, 300, function () { | |
$('#slider').html(data); |
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 redis | |
import threading | |
class Worker(threading.Thread): | |
'''Generic Main Worker class''' | |
def __init__(self, r, channels): | |
# init super | |
threading.Thread.__init__(self) |