I hereby claim:
- I am vladimiroff on github.
- I am vladimiroff (https://keybase.io/vladimiroff) on keybase.
- I have a public key ASDiZtvWsZMPVl5WQVQn3JDIwrO7IudbBH-DAlG2Syopdwo
To claim this, I am signing this object:
| be95f1843e23ae1487bdda67404b300f4297f8aeb8362e4eb99062979123f193 |
| Section "InputClass" | |
| Identifier "Apple Magic Mouse" | |
| MatchIsPointer "yes" | |
| MatchVendor "0x5ac" | |
| MatchProduct "0x30d" | |
| Driver "hid-magicmouse" | |
| Option "AccelerationNumerator" "2" | |
| Option "AccelerationDenominator" "1" | |
| Option "AccelerationThreshold" "4" | |
| EndSection |
| import unittest | |
| from tictac import ( | |
| Board, IllegalMoveError, WrongTurnError, | |
| IN_PROGRESS, X_WON, O_WON, DRAW) | |
| class TestBoard(unittest.TestCase): | |
| def setUp(self): | |
| self.board = Board() |
I hereby claim:
To claim this, I am signing this object:
| import json | |
| from django.http import HttpResponse | |
| class JsonResponse(HttpResponse): | |
| def __init__(self, content, status=None): | |
| super(JsonResponse, self).__init__(json.dumps(content), status=status, | |
| mimetype='application/json') |
| cd $HOME/.vim/ | |
| git submodule sync | |
| git submodule foreach --recursive "git checkout master; git pull origin master; echo" |
| from django.core.urlresolvers import reverse | |
| from django.shortcuts import redirect | |
| from django.conf import settings | |
| class AdultsOnlyMiddleware(object): | |
| """ | |
| Each user has to confirm that he is at least 18 years old | |
| Note: No, I did not make this for some porn site. | |
| """ |
| " Unmap these silly J,K | |
| unmap J | |
| unmap K | |
| map <C-h> previousTab | |
| map <C-l> nextTab | |
| " Cyrillic shortcuts | |
| map гг scrollToTop | |
| map Г scrollToBottom |
| # -*- coding: utf-8 -*- | |
| from django import template | |
| register = template.Library() | |
| @register.filter | |
| def hash(name, key): | |
| ''' | |
| Returns the value of given key | |
| in dict or... something like a dict |
| ''' | |
| Try to import django environment on each bpython2 call. | |
| So if there is a Django project in current directory we could use | |
| bpython instead of ipython with the `manage.py shell_plus` command, | |
| or just with `bpython2` | |
| TODO: Optimize this only for bpython calls. | |
| ''' | |
| try: | |
| from django.core.management import setup_environ |