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
[MASTER] | |
profile=no | |
persistent=yes | |
ignore=migrations | |
cache-size=500 | |
[BASIC] | |
# Regular expression which should only match correct module names | |
module-rgx=([a-z][a-z0-9_]*)$ |
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 "services/httpd/map.jinja" import httpd with context %} | |
{% set ltsv_conf = httpd.modconfdir + "/00-ltsv-log-format.conf" %} | |
httpd: | |
pkg: | |
- installed | |
- name: {{ httpd.pkg }} | |
service: | |
- running | |
- name: {{ httpd.service }} |
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
############################################################################################ | |
>>> sys.version | |
'2.7.3 (default, Aug 9 2012, 17:23:57) \n[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)]' | |
>>> for algo in hashlib.algorithms: | |
... print '{algo} has hexdigest()'.format(instance=getattr(hashlib, algo)(), algo=algo) | |
... | |
md5 has hexdigest() | |
sha1 has hexdigest() | |
sha224 has hexdigest() |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
class Context(object): | |
def __enter__(self): | |
yield | |
def __exit__(self, type, value, tracebck): | |
print("type: {0}".format(str(type(value)))) | |
print("repr: {0}".format(repr(value))) | |
print("istuple: {0}, isioerror: {1}".format(isinstance(value, tuple), isinstance(value, IOError))) |
When using “bound” objects in an .aurora
file it is an absolute that you do not have spaces in the “mustaches”.
Examples:
- Bad:
{{ profile.my_var }}
- Good:
{{profile.my_var}}
When scheduling a task on aurora with Production=True
, the 0.7-incubating scheduler will set a default constraint preventing more than one instance of the task on the same rack.
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
debugdjango() { | |
action=${1:-traceback} | |
port=${2:-8000} | |
interface=${3:-lo} | |
TCPDUMP="tcpdump -i${interface} -A port ${port}" | |
case $action in | |
all) | |
echo "INFO: Running tcpdump on interface $interface and port $port" >&2 | |
sudo $TCPDUMP | |
;; |
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
# Put this in /etc/profile.d/cdpy.sh or copy the function into ~/.bashrc | |
# Change to the source directory of just about any python module to RTFS | |
# | |
# (c) 2011 Jeff Schroeder <jeffschroeder@computer.org> released as GPLv2 | |
cdpy() { | |
module="$1" | |
[ -z "$module" ] && return 1 | |
dir=$(python -c " | |
import os | |
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
# Copied from the django source but added feed_url so the write actually works. | |
import sys | |
from django.utils import feedgenerator | |
feed = feedgenerator.Atom1Feed( | |
title=u"Poynter E-Media Tidbits", | |
link=u"http://www.poynter.org/column.asp?id=31", | |
feed_url=u"http://rss.feed_url/", | |
description=u"A group weblog by the sharpest minds in online media/journalism/publishing.", | |
language=u"en", |
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
jeff@desktopmonster:~/src/git/salt/salt/modules (misc-fixes)$ gdi apt.py | |
diff --git a/salt/modules/apt.py b/salt/modules/apt.py | |
index f3b0cd8..75751a4 100644 | |
--- a/salt/modules/apt.py | |
+++ b/salt/modules/apt.py | |
@@ -196,7 +196,7 @@ def upgrade(refresh=True): | |
return ret_pkgs | |
-def list_pkgs(regex_string=""): |
OlderNewer