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
| {% load cms_tags sekizai_tags %} | |
| <!doctype html> | |
| <head> | |
| <title>{{ request.current_page.get_title }}</title> | |
| {% render_block "css" %} | |
| </head> | |
| <body> | |
| {% cms_toolbar %} | |
| {% placeholder "main" %} |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFMCGT2Lz0LKndS26QHocSa7bJ/8kabu1JQbYJQ8sGd0Y1RbOLnJZiibM0uE0mvSTeXyxuNJyyPe7nvSR4aNfq5bn7dA8ek7Siy1449kA22nwI/GM62fYfIDwAt6GJSvacCKaZWokQ/kiZ9UG9anE+RXR1GSDgE42CPfcT0VFDu83TQ0/55qEfmMWimFqoZG/dCUGarTmNta+irEy4JL0VNQ2B59IDW/WskmgP6EuGBUoCiuOy95SiFS5t/SQrRebpDTtLiSvb+4lbL2BmAUQnuPoYPgLbj62w5n/E9qWbYCck/00TGSjvQfZeSXJYDYlEpbVMGx7p0C3S89+KB26/ jonas@Jonass-MacBook-Air.local |
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
| # -*- coding: utf-8 -*- | |
| from django.db import models | |
| from django.db.models.query import QuerySet | |
| class ChainableManager(models.Manager): | |
| """ | |
| class MyChainableManager(ChainableManager): | |
| def active(self): |
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
| #!/bin/sh | |
| # | |
| # Copyright (c) 2011, Jonas Obrist | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # * Redistributions in binary form must reproduce the above copyright |
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
| xrandr: Failed to get size of gamma for output default | |
| Screen 0: minimum 320 x 175, current 1920 x 1080, maximum 1920 x 1080 | |
| default connected 1920x1080+0+0 0mm x 0mm | |
| 1920x1080 50.0* 51.0 | |
| 1680x1050 52.0 | |
| 1600x1024 53.0 | |
| 1440x900 54.0 | |
| 1400x1050 55.0 | |
| 1360x768 56.0 57.0 | |
| 1280x1024 58.0 59.0 |
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
| from multiprocessing import Process | |
| from django.core import serializers | |
| from django.core.management import call_command | |
| from StringIO import StringIO | |
| def dump_database(): | |
| sio = StringIO() | |
| call_command('dumpdata', stdout=sio, natural=True) | |
| return sio.getvalue() |
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
| #!/bin/sh | |
| run_tests() | |
| { | |
| COMMAND TO RUN YOUR TESTS | |
| if [ "$?" != "0" ] | |
| then | |
| notify-send "BUILD FAILED" -i "error" | |
| else | |
| notify-send "Build Successful" | |
| fi |
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
| from contextlib import contextmanager | |
| from django.contrib.messages.storage.base import BaseStorage, Message | |
| from django.test.client import RequestFactory | |
| from django.utils.decorators import method_decorator | |
| class TestMessagesBackend(BaseStorage): | |
| def __init__(self, request, *args, **kwargs): | |
| self._loaded_data = [] | |
| super(TestMessagesBackend, self).__init__(request, *args, **kwargs) | |
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
| from django.utils.decorators import method_decorator | |
| def cbv_decorator(decorator): | |
| """ | |
| Turns a normal view decorator into a class-based-view decorator. | |
| Usage: | |
| @cbv_decorator(login_required) | |
| class MyClassBasedView(View): |
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
| import re | |
| GOOD = { | |
| "#abc": ['abc'], | |
| "#abc,#123": ['abc', '123'], | |
| "567": ['567'], | |
| "abc,123": ['abc', '123'], | |
| "abc,#611": ['abc', '611'], | |
| "#aaff33": ['aaff33'], | |
| "9923cc": ['9923cc'], |