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
* Один | |
* Два | |
* Три | |
* Четыре | |
* Четыре-с-половиной | |
* Пять | |
* Шесть | |
[:ul | |
[:li Один] |
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 functools import wraps | |
def decorator_wraps(f): | |
@wraps(f) | |
def inner(*args, **kwargs): | |
return f(*args, **kwargs) | |
inner.test = 'ok' |
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
# To use this recipe you have to: | |
# $ brew install python --framework | |
# $ mkdir ~/Frameworks | |
# $ ln -s "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework" ~/Frameworks | |
# $ brew install ./vim.rb | |
require 'formula' | |
require 'open-uri' | |
class Vim < Formula |
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 | |
'''Django command for getting info about template tags and filters within your project | |
It suports two output formats: human readable (with extra doc) and vim quickfix format | |
Usage: ./manage.py tag_info tag_or_filter_name | |
''' | |
import os | |
import sys |
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 | |
# Fork of https://gist.github.com/1242760 | |
from django.http import HttpResponse | |
from rpclib.server.wsgi import WsgiApplication | |
class DjangoApplication(WsgiApplication): | |
def __call__(self, request): | |
django_response = HttpResponse() |
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 | |
import gc | |
import inspect | |
import weakref | |
from django.core.management.base import BaseCommand, CommandError | |
from django.dispatch import Signal | |
REF_TYPES = (weakref.ReferenceType,) |
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/bash | |
cd ./$(git rev-parse --show-cdup) | |
result=$(mktemp /tmp/pre-commit.XXXXX) | |
STAGED=${STAGED:---staged} | |
changed_py=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.py$') | |
changed_js=$(git diff --name-only --diff-filter=AM $STAGED | grep -E '\.js$') | |
[[ -z $changed ]] && exit 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
<Files "humans.txt"> | |
ForceType 'text/plain; charset=utf-8' | |
</Files> |
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
<!DOCTYPE html> | |
<div id="wrapper"></div> | |
<script> | |
var count = 30; | |
var start = 'ffcc00'; | |
var end = '6699cc'; | |
var sR = parseInt(start.slice(0, 2), 16); | |
var sG = parseInt(start.slice(2, 4), 16); | |
var sB = parseInt(start.slice(4, 6), 16); | |
var eR = parseInt(end.slice(0, 2), 16); |
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
<!DOCTYPE html> | |
<div id="wrapper"></div> | |
<script> | |
var limit = 100; | |
var step = 256 / limit; | |
var wrapper = document.getElementById('wrapper'); | |
for (var color = 0; color < 256; color += step) { | |
color = Math.round(color); | |
console.log(color); | |
var span = document.createElement('span'); |