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
# put in app/management/commands | |
from datetime import datetime | |
import importlib | |
import logging | |
from optparse import make_option | |
from django.conf import settings | |
from django.core.management.base import BaseCommand | |
import django_rq |
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
class JSONMiddleware(object): | |
""" | |
Process application/json requests data from GET and POST requests. | |
""" | |
def process_request(self, request): | |
if 'application/json' in request.META['CONTENT_TYPE']: | |
# load the json data | |
data = json.loads(request.body) | |
# for consistency sake, we want to return | |
# a Django QueryDict and not a plain Dict. |
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 config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
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
### Keybase proof | |
I hereby claim: | |
* I am lucasroesler on github. | |
* I am theaxer (https://keybase.io/theaxer) on keybase. | |
* I have a public key whose fingerprint is A62A A0E7 B9A9 CD22 CF1B CAF4 2355 3DFF EDE5 F952 | |
To claim this, I am signing this object: |
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 import forms | |
from django.utils.translation import ugettext_lazy as _ | |
from django.core.validators import validate_email, EMPTY_VALUES | |
from django.forms.fields import Field | |
class CommaSeparatedEmailField(Field): | |
description = _(u"E-mail address(es)") | |
def __init__(self, *args, **kwargs): | |
self.token = kwargs.pop("token", ",") |
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
swagger: '2.0' | |
info: | |
title: Teem User Provisioning API | |
version: "1.0.0" | |
contact: | |
url: https://teem.com/developers/ | |
email: [email protected] | |
# the domain of the service | |
host: app.teem.com | |
# will be prefixed to all paths |
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
FORMAT: 1A | |
HOST: https://eventboard.io/api/v4 | |
# Eventboard.io API Spec | |
The api specification for eventboard.io | |
# Data Structures | |
## Reservation Base (object) | |
+ id: 1 (number) |
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
swagger: '2.0' | |
info: | |
title: Eventboard API | |
version: 4.0.0 | |
contact: | |
url: https://eventboard.io/developers/ | |
email: [email protected] | |
host: eventboard.io | |
basePath: /api/v4 | |
schemes: |
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
[alias] | |
# common operations | |
cp = cherry-pick | |
ci = commit | |
co = checkout | |
br = branch | |
undo-commit = reset --soft HEAD~1 | |
# log as a graph | |
graph = log --graph --oneline --decorate --all |
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
[alias] | |
# common operations | |
cp = cherry-pick | |
ci = commit | |
co = checkout | |
br = branch | |
undo-commit = reset --soft HEAD~1 | |
# sort branches by last update | |
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" |
OlderNewer