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
# These patches help make the jquery validator work well with | |
# the Twitter Bootstrap html & class conventions | |
# | |
# MONKEY-PATCH warning | |
# These may need to be adjusted if upgrading or changing jquery-validate | |
# from 1.9.0 | |
$.validator.setDefaults | |
errorClass: "error" | |
validClass: "success" |
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
#!/bin/bash | |
set -o errexit -o nounset -o pipefail | |
function -h { | |
cat <<EOF | |
USAGE: syslogged <program> <args> | |
Wraps a command invocation with logging, sending STDOUT and STDERR to | |
syslog, setting the syslog tag to: | |
<program>[<pid>] |
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
AUTHENTICATION_BACKENDS = ( | |
'social_auth.backends.google.GoogleOAuth2Backend', | |
'django.contrib.auth.backends.ModelBackend', | |
) | |
LOGIN_REDIRECT_URL = '/' | |
GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID'] | |
GOOGLE_OAUTH2_CLIENT_SECRET = os.environ['GOOGLE_OAUTH2_CLIENT_SECRET'] | |
GOOGLE_WHITE_LISTED_DOMAINS = ['incuna.com'] | |
SOCIAL_AUTH_USER_MODEL = 'auth.User' |
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
To get started with Docker/Marathon/Mesos, you need to install a | |
new Mesos, a new Marathon, and Deimos, the bridge to Docker. | |
You'll also need Docker and the JVM. These instructions are for | |
Ubuntu 13.10. | |
## Install Mesos prerequisites | |
:; sudo apt-get update | |
:; sudo apt-get install zookeeperd default-jre python-setuptools python-protobuf curl pip | |
## Install recent Mesos |
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 os | |
import os.path | |
import sys | |
from graphite.render.hashing import ConsistentHashRing | |
instances = [] | |
unwelcome_instances = [] | |
for arg in sys.argv[1:]: | |
unwelcome = False |
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 aws from 'aws-sdk'; | |
import fs from 'fs'; | |
import ini from 'ini'; | |
import path from 'path'; | |
// compatibility with aws-cli | |
let cliCacheFolder = path.join(process.env.HOME, '.aws', 'cli', 'cache'); | |
let awsProfile = process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE; | |
if (awsProfile) { | |
try { |
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
global | |
log logstash local0 #Change logstash to your naming | |
log-send-hostname | |
chroot /var/lib/haproxy | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 4000 | |
defaults |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: carbon-cache | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: carbon-cache init script | |
# Description: An init script for Graphite's carbon-cache daemon. | |
### END INIT 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
# -*- coding: utf-8 -*- | |
""" | |
# usage: python mro_exploration.py | |
# https://github.com/pzrq/ | |
Better PyCharm mixin handling would make it far more useful for | |
Django Class-Based Views, Managers, and in contexts others have identified | |
such as Werkzeug. | |
https://youtrack.jetbrains.com/issue/PY-7712 |
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.contrib.sessions.backends.base import SessionBase, CreateError | |
from django.conf import settings | |
from django.utils.encoding import force_unicode | |
import redis | |
class SessionStore(SessionBase): | |
""" Redis store for sessions""" | |
def __init__(self, session_key=None): | |
self.redis = redis.Redis( |
OlderNewer