I hereby claim:
- I am ojii on github.
- I am ojii (https://keybase.io/ojii) on keybase.
- I have a public key whose fingerprint is 8DBD 52C5 761A EF34 D7C4 B2C0 F8E8 E2D9 DAF3 CFFD
To claim this, I am signing this object:
def last_page_on_path(path): | |
""" | |
Given a path (eg /a/b/c/d/e/), find the "last" page on that path. | |
If we have a CMS tree of: | |
|-a | |
| |-b | |
| | |-c | |
I hereby claim:
To claim this, I am signing this object:
# using https://pypi.python.org/pypi/codequality/0.2-dev | |
codequality --ignore=cms/migrations/* --ignore=cms/static/cms/js/libs/* --ignore=cms/static/cms/js/jstree/* --ignore=cms/static/cms/js/plugins/jquery.ui.custom.js --ignore=cms/static/cms/js/plugins/jquery.ui.nestedsortable.js cms |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrV6ltrDFKmGdgc1H8vKZTHuBO7H4cpQJleNuTvfG1I1hFD54EnkJbA1O5zzNmGVEOzlF2E/+mCQYm12MFtEf8HTomU7XivSWv207pxi8jR2JteGmKLkx2xN4MbSXjo48WLUXu9GcWaLbVeC4UBPY4R1ThEk9LQEIU79BwqsMtAP306tQhsGf1mZTeCuy53687o20Rdw5UxS4jgya+YQUaRKsFP9RTGORb/fX/AUVbEbe+SEQ8wxsKpn2bnvWSmc1KN3ShuB4J1sDO5QdsVYAoCv9hwwq9/jti5t2XfuNY53/xNvCCougGp5jL74wzVyi3707fr9Gor06Q8rAaIvOF jonas@jonas-ubuntu |
# -*- coding: utf-8 -*- | |
from kivy.support import install_twisted_reactor; install_twisted_reactor() | |
from twisted.internet import reactor | |
from twisted.internet import protocol | |
from twisted.protocols.basic import NetstringReceiver | |
from kivy.app import App | |
from kivy.uix.textinput import TextInput | |
from kivy.uix.button import Button |
def cbv_decorator(decorator): | |
""" | |
Turns a normal view decorator into a class-based-view decorator. | |
Usage: | |
@cbv_decorator(login_required) | |
class MyClassBasedView(View): | |
pass | |
""" |
/* | |
Base64.encode(str): | |
Returns a string that is guaranteed to be a valid ID and can be decoded into its | |
original form. No two inputs generate the same output. | |
Base64.decode(str): | |
Returns the original string from the output of Base64.encode. | |
*/ | |
var Base64 = { | |
characters: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.", | |
'encode': function(data) { |
# -*- coding: utf-8 -*- | |
import sys | |
import requests | |
__doc__ = """bitmask.py | |
Usage: | |
bitmask.py <varname> <cookiename> [--default=<default>] [--html] [--compress] <mask>... | |
Options: |
ENV_BASE=env | |
REQUIREMENTS_DIR=test_requirements | |
define runtests | |
virtualenv-$1 $(ENV_BASE)-$1-$2 | |
$(ENV_BASE)-$1-$2/bin/pip install $(PIP_FLAGS) -r $(REQUIREMENTS_DIR)/django-$2.txt | |
$(ENV_BASE)-$1-$2/bin/python runtests.py $(TEST_FLAGS) | |
endef | |
all: py25dj13 py25dj14 py26dj13 py26dj14 py26djtrunk py27dj13 py27dj14 py26dj15 py27dj15 py33dj16 py26djtrunk py27djtrunk py33djtrunk |
# -*- coding: utf-8 -*- | |
from helpers import Form, CharField | |
class ConfigForm(Form): | |
key = CharField('Twitter Consumer Key', max_length=255, required=True) | |
secret = CharField('Twitter Consumer Secret', max_length=255, required=True) | |
def to_settings(self, settings): | |
data = self.cleaned_data |