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
diff --git a/Makefile b/Makefile | |
index d481e68..0f8b4de 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -22,12 +22,12 @@ include Makefile.cfg | |
export CC = gcc -pthread | |
export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC | |
-export LDLIBS += -lncursesw | |
+export LDLIBS += $(LDFLAGS) -lncurses -liconv |
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
#!/bin/sh | |
echo "[NOTICE] *** Starting post-receive hook." | |
cd /etc/puppet | |
unset GIT_DIR | |
git fetch origin | |
if [ "$?" -ne "0" ]; then |
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
from tornado.httpclient import HTTPClient, HTTPRequest | |
import simplejson | |
def handle_tweet_stream(response): | |
try: | |
# Print the parsed twitter stream. | |
print simplejson.loads(response) | |
except ValueError: | |
return | |
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
for f in `find . -path "*.json"`; do python -mjson.tool $f $f.output && mv $f.output $f; done |
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
" Statusline | |
hi User1 guifg=#eea040 guibg=#222222 | |
hi User2 guifg=#dd3333 guibg=#222222 | |
hi User3 guifg=#ff66ff guibg=#222222 | |
hi User4 guifg=#a0ee40 guibg=#222222 | |
hi User5 guifg=#eeee40 guibg=#222222 | |
set laststatus=2 | |
set statusline= | |
set statusline +=%1*\ %n\ %* "buffer number |
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 python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |
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
<!DOCTYPE html> | |
<head><title>Scroller demo</title></head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var i = 0; | |
setInterval(function() { | |
var max_elements = 10; |
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
# ec2utils: puppet recipes for use with Amazon's Elastic Compute Cloud (and | |
# associated services) | |
# | |
# Copyright 2009 Flock, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
{ | |
"cluster": {"name": "testcluster"}, | |
"cloud": { | |
"aws": { | |
"access_key": "<redacted>", | |
"secret_key": "<redacted>" | |
} | |
}, | |
"discovery": { "type": "ec2" }, | |
"index": { |
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 getpass, imaplib | |
# The following snippet will fetch all emails from an IMAP server. | |
M = imaplib.IMAP4() | |
M.login(getpass.getuser(), getpass.getpass()) | |
M.select() | |
typ, data = M.search(None, 'ALL') | |
for num in data[0].split(): | |
typ, data = M.fetch(num, '(RFC822)') |