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
# ElasticSearch Service | |
description "ElasticSearch" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] |
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
# | |
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS | |
# | |
# For any modifications to this file, see Kannel User Guide | |
# If that does not help, see Kannel web page (http://www.kannel.org) and | |
# various online help and mailing list archives | |
# | |
# Notes on those who base their configuration on this: | |
# 1) check security issues! (allowed IPs, passwords and ports) | |
# 2) groups cannot have empty rows inside them! |
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
import logging | |
class QuotelessStr(str): | |
""" | |
Return the repr() of this string *without* quotes. This is a | |
temporary fix until https://github.com/severb/graypy/pull/34 is resolved. | |
""" | |
def __repr__(self): | |
return self |
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.core.management.base import BaseCommand, CommandError | |
from django.db.models import get_models, get_app, fields | |
from django.db.models.fields import related | |
class Command(BaseCommand): | |
help = """Generate factory-boy factories for the given app""" | |
def handle(self, *args, **options): | |
assert len(args) == 1, 'Must specify app name as first and only argument' |
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 functools import wraps | |
from routers import ForceReadForModelsRouter | |
__all__ = ['uses_forced_read_router'] | |
def uses_forced_read_router(func): | |
@wraps(func) | |
def wrapper(req, *args, **kwargs): |
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
def get_cache_key(model, pk): | |
""" | |
Generates a cache key based on ``WRITE_CACHE_PREFIX``, the cache key prefix | |
defined in the settings file (if any), the Django app and model name, and | |
the primary key of the object. | |
""" | |
params = { | |
'prefix': getattr(settings, 'WRITE_CACHE_PREFIX', ''), | |
'app': model._meta.app_label, | |
'model': model._meta.object_name, |
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
http_transport: | |
transport_name: "httptransport" | |
web_path: "/api/" | |
web_port: 8889 | |
health_path: "/health-status/" | |
reply_expected: True | |
middleware: | |
logging_mw: vumi.middleware.logging.LoggingMiddleware | |
rapidsms_relay_http: |
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
(coverage-test)tobias@tobias-MS-7924:~/code/coverage-3.7.1$ ls | |
AUTHORS.txt build CHANGES.txt coverage coverage.egg-info dist doc igor.py __main__.py MANIFEST.in PKG-INFO README.txt requirements.txt setup.cfg setup.py tests tox.ini | |
(coverage-test)tobias@tobias-MS-7924:~/code/coverage-3.7.1$ python setup.py install | |
running install | |
running bdist_egg | |
running egg_info | |
writing dependency_links to coverage.egg-info/dependency_links.txt | |
writing top-level names to coverage.egg-info/top_level.txt | |
writing entry points to coverage.egg-info/entry_points.txt | |
writing coverage.egg-info/PKG-INFO |
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
" Needed on some linux distros. | |
" see http://www.adamlowe.me/2009/12/vim-destroys-all-other-rails-editors.html | |
filetype off | |
"call pathogen#helptags() | |
"call pathogen#runtime_append_all_bundles() | |
syntax enable | |
"set background=dark | |
"colorscheme solarized |
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
(coverage-test)tobias@tobias-MS-7924:~$ pip install coverage | |
Collecting coverage | |
Installing collected packages: coverage | |
Successfully installed coverage-3.7.1 | |
(coverage-test)tobias@tobias-MS-7924:~$ coverage debug sys | |
-- sys ---------------------------------------- | |
version: 3.7.1 | |
coverage: /home/tobias/.virtualenvs/coverage-test/lib/python3.3/site-packages/coverage/__init__.py | |
cover_dir: /home/tobias/.virtualenvs/coverage-test/lib/python3.3/site-packages/coverage | |
pylib_dirs: /usr/lib/python3.3 |
OlderNewer