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 | |
# | |
# Christopher Peplin | |
# chris.peplin@rhubarbtech.com | |
# | |
# A litte script to migrate from Klok to Timetrap. | |
# Use the "download all time entry data" option in Klok for each project you wish to convert | |
# to a timesheet in Timestop. The copy and paste (or by some other method) | |
# convert their HTML table to plain text, with the fields separated by tabs. | |
# |
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
""" | |
conkec2 | |
Christopher Peplin, chris.peplin@rhubarbtech.com | |
Python script to output current EC2 instance information to a text file, ideally | |
for Conky to display on your desktop. | |
Expects the standard AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment | |
variables to be defined. |
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 | |
cd /tmp | |
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz | |
tar zxf rubygems-1.3.6.tgz | |
cd rubygems-1.3.6 | |
sudo ruby setup.rb | |
sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem | |
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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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
""" Need to serve some static HTML files, but can't use S3 because it won't | |
resolve index.html for you? Grab a CloudFront distribution from Amazon, point it | |
to your bucket, and set your index.html as the "default root object". | |
This code snippet uses the boto (http://code.google.com/p/boto/) Python package | |
to set the default root object on your distribution. | |
Christopher Peplin, chris.peplin@rhubarbtech.com | |
""" | |
from boto.cloudfront import CloudFrontConnection |
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
# Makefile for building PyLucene | |
# | |
# Supported operating systems: Mac OS X, Linux and Windows. | |
# See INSTALL file for requirements. | |
# See jcc/INSTALL for information about --shared. | |
# | |
# Steps to build | |
# 1. Edit the sections below as documented | |
# 2. make | |
# 3. make install |
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 | |
source $VIRTUAL_ENV/bin/activate | |
mkdir -p tmp-jcc | |
pushd tmp-jcc | |
ROOT=../$(dirname $0) | |
unzip -q $VIRTUAL_ENV/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg |
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 ruby | |
# Bulk Lighthouse ticket import from a text file | |
# Christopher Peplin, peplin@bueda.com | |
# | |
# Used this for taking a big Markdown file of tickets we discussed during a | |
# meeting and importing them all into Lighthouse. No attempt to be flexible, | |
# just useful in this one case. One ticket title per line, where headers and | |
# subheaders are used as tags. | |
# | |
# Expects the following pseudo-Markdown text file format: |
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 mockito | |
import faker | |
import oauth_access.access | |
def mock_facebook_success(user_data=None): | |
user_data = user_data or {'id': '42', | |
'email': faker.internet.email(), | |
'first_name': faker.name.first_name(), | |
'last_name': faker.name.last_name()} | |
mockito.when(oauth_access.access.OAuthAccess).check_token( |
OlderNewer