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
import pymongo.errors | |
# Retry decorator with exponential backoff | |
def retry(tries=5, delay=0.1, backoff=2): | |
"""Retries a function or method until it returns True. | |
delay sets the initial delay in seconds, and backoff sets the factor by which | |
the delay should lengthen after each failure. backoff must be greater than 1, | |
or else it isn't really a backoff. tries must be at least 0, and delay | |
greater than 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: amix the lucky stiff | |
" http://amix.dk - [email protected] | |
" | |
" Version: 3.6 - 25/08/10 14:40:30 | |
" | |
" Blog_post: | |
" http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc | |
" Syntax_highlighted: | |
" http://amix.dk/vim/vimrc.html |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Asymptote subscriptions in Google Reader</title> | |
</head> | |
<body> | |
<outline text="24in60.com" title="24in60.com" type="rss" | |
xmlUrl="http://www.24in60.com/feed" htmlUrl="http://www.24in60.com"/> | |
<outline title="android" text="android"> | |
<outline text="Android Developers Blog" |
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
#!/usr/bin/env bash | |
# haproxyd | |
# Script to start|stop|restart haproxy from /etc/init.d/ | |
# By Gubatron. | |
HAPROXY_CONFIG_PATH=/home/ubuntu/canvas/src/loadbalancer/haproxy.conf | |
HAPROXY_DAEMON=/usr/local/sbin/haproxy | |
test -x $HAPROXY_DAEMON || 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
# file: /home/ubuntu/.aws_keys | |
export AWS_ACCESS_KEY_ID=XXXXXXXXX | |
export AWS_ACCOUNT_ID=1111111111 | |
export AWS_SECRET_ACCESS_KEY=fFjerT235Fj | |
# subsequently modify /home/ubuntu/.bash_profile and "dot this in" by using: | |
# . /home/ubuntu/.aws_keys |
NewerOlder