A few command line utilities for various tasks.
$ curl -L https://gist.github.com/xj9/2dd3c56011c08d395975/raw/9ba87d40893e98e7b2d0d9f123a4be60664489c0/install.sh | sh
tab.tghlpr_group_tab { | |
color: #8FA1B2 !important; | |
text-shadow: none !important; | |
border-radius: 0 !important; | |
border: none !important; | |
border-right: 1px solid #555 !important; | |
} | |
tab.tghlpr_group_tab[activeGI] { | |
color: #F5F7FA !important; | |
background-color: #1A4666 !important; |
# -*- coding: utf-8 -*- | |
""" | |
Case-Insensitive ModelBackend | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Takes an arbitrary number of command line arguments and randomly selects one | |
to return. The amount of entropy involved can be adjusted by setting the | |
environment variable ```RANDBYTES```, which defaults to 4096. | |
""" | |
from __future__ import print_function |
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<service_bundle type="manifest" | |
name="export"> | |
<service name="application/gogs" | |
type="service" | |
version="1"> | |
<create_default_instance enabled="false" /> | |
<single_instance /> | |
<dependency name="network" |
# -*- coding: utf-8 -*- | |
class tail_recursive(object): | |
""" | |
Based on comments on this active state recipe: <http://code.activestate.com/recipes/496691/> | |
""" | |
def __init__(self, func): | |
self.func = func | |
self.firstcall = True | |
self.CONTINUE = object() |
# -*- coding: utf-8 -*- | |
""" | |
rcombinations.py | |
~~~~~~~~~~~~~~~~ | |
Implements different a restricted combination function. | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or |
try: | |
from functools import update_wrapper | |
except ImportError: | |
from django.utils.functional import update_wrapper # Python 2.3, 2.4 fallback. | |
from django.contrib.auth.decorators import _CheckLogin | |
def login_not_required(view_func): | |
""" | |
Decorator which marks the given view as public (no login required). |