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
{ | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "git://github.com/jmhobbs/Swiftmailer-Transport--AWS-SES.git" | |
} | |
], | |
"require": { | |
"jmhobbs/swiftmailer-transport-aws-ses": "dev-master" | |
} |
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
<?php | |
// This is how many different "random" avatars you have. | |
$default_avatar_count = 20; | |
foreach( $comments as $comment ) { | |
// Normalize the email address so user input differences doesn't change the avatar. | |
// This is technically against RFC 2821, but in practice it is ok. | |
$normalized_email_address = trim(strtolower($comment->comment_author_email)); |
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
<!doctype html> | |
<html> | |
<head> | |
<title>GoSquared!</title> | |
</head> | |
<body> | |
<script src="jquery.min.js"></script> | |
<script> | |
jQuery(document).ready(function($) { | |
var API_KEY = 'demo', |
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 boto.s3.connection import S3Connection | |
conn = S3Connection('YOUR-ACCESS-KEY', 'YOUR-SECRET-KEY') | |
bucket = conn.get_bucket('FROM-BUCKET-NAME') | |
for key in bucket.list(): | |
print key.name | |
key.copy('TO-BUCKET-NAME', key.name) |
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
<?php | |
/* APPPATH/classes/route.php */ | |
class Route extends Kohana_Route { | |
public static function compile ( $uri, array $regex = NULL ) { | |
if ( ! is_string( $uri ) ) { return; } | |
return parent::compile( $uri, $regex ) . 'i'; | |
} |
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 | |
import json | |
import re | |
def tokenize ( string ): | |
# Strip extra punctuation | |
string = re.sub( r'[^a-z0-9A-Z \'\-]', '', string.lower() ) | |
return string.split( ' ' ) | |
def main (): |
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
jmhobbs@Cordelia:/data/working/example$ (193m|master|?AM)$ phlint | |
= Checking 176 files with 4 processes... | |
(1) = 50 | |
(2) = 100 | |
(3) = 150 | |
(1) Done | |
(0) Done | |
(3) Done | |
(2) Done | |
jmhobbs@Cordelia:/data/working/example$ (193m|master|?AM)$ |
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
# SET THESE | |
USERNAME = '' | |
API_KEY = '' | |
CONTAINER_NAME = '' | |
LOCAL_DIRECTORY_NAME = '' | |
# FORGET THESE | |
import cloudfiles | |
import os | |
import sys |
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 | |
for i in $(find . -type d -empty | grep -v .git); | |
do touch $i/.gitignore | |
git add $i/.gitignore | |
done |
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
# | |
# Hubot Script! | |
# Random fact about someone else. | |
# | |
# Example | |
# | |
# Hubot: fact me John Hobbs | |
# Hubot: John Hobbs counted to infinity - twice. | |
# | |
# John Hobbs 2011 - Licensed under MIT |