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
# 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 |
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 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 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 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 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 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
Index: src/java/org/jivesoftware/spark/ui/ChatArea.java | |
=================================================================== | |
--- src/java/org/jivesoftware/spark/ui/ChatArea.java (revision 13060) | |
+++ src/java/org/jivesoftware/spark/ui/ChatArea.java (working copy) | |
@@ -298,7 +298,7 @@ | |
final Document doc = getDocument(); | |
styles.removeAttribute("link"); | |
doc.insertString(doc.getLength(), text, styles); | |
- setCaretPosition(doc.getLength()); | |
+ //setCaretPosition(doc.getLength()); |
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 sys | |
import markdown2 | |
from pygments.formatters import HtmlFormatter | |
def main(): | |
# ------------------------------------------------------------------------ | |
# Parse and validate inputs. | |
# ------------------------------------------------------------------------ | |
input_filepath = sys.argv[1] |
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
# ~/.oh-my-zsh/themes/bira-date.zsh-theme | |
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' | |
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' | |
local rvm_ruby='' | |
if which rvm-prompt &> /dev/null; then | |
rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' |
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 | |
# Some example results on my machine: | |
# ─[2013-03-30 16:19:13] ai@Mill ~/Programming/python | |
# ╰─$ ./list_vs_dict.py | |
# build_list vs. build_dict: '-9.68'% | |
# access_list vs. access_dict: '-59.29'% | |
# ╭─[2013-03-30 16:20:10] ai@Mill ~/Programming/python | |
# ╰─$ ./list_vs_dict.py | |
# build_list vs. build_dict: '-18.42'% |
OlderNewer