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
# extract_patches - Extracts patches from an .mbox | |
# USAGE: | |
# extract_patches [file] | |
# | |
# Will create "<revision>.log" containing the commit log, and "<revision>.patch" containing the actual diff. | |
# Assumes SVN-style commit log. | |
# | |
require 'rubygems' | |
require 'tmail' |
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
# reformat_log - Reformats log messages | |
# USAGE: | |
# reformat_log [file] | |
# | |
# Will read the SVN-style commit log from file and generate commands in [file].sh | |
# which will recreate the commits in a git repository. | |
# Assumes the following: | |
# * You have a .patch file generated using extract_patches | |
# * Your git repository is in "trunk" | |
# * A copy of your repository in its final state in "all-files" (if you are adding binary files) |
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
# Teambox API script which un-watches all conversations in a project. | |
# | |
# Usage: stop_watching_teambox.rb [project name] [last_id](optional) | |
# | |
# Feel free to use! - James | |
# | |
require 'rubygems' | |
require 'httparty' | |
module Teambox |
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
<html> | |
<!-- | |
EvilOnJavaRails | |
A quick and dirty microframework which works nothing like the actionview/actioncontroller code in rails. | |
Requires EJS (http://www.embeddedjs.com/) and jQuery. | |
Use at your own peril ;) - James | |
--> |
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 | |
# Composes animation frames in subdirectories into a single consolidated image | |
# e.g. | |
# composeit robot (Will combine robot{ANIMS}{DIRECTIONS}/*.png into a single robot.png) | |
THEBASE=$1 | |
DIRECTIONS="NE NW SE SW" | |
ANIMS="Walk Idle" | |
DFILES="" | |
FRAME_SIZE="64x64" |
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
require 'fog' | |
connection = Fog::Compute.new( :provider => 'AWS', :aws_secret_access_key => '', :aws_access_key_id => '') | |
server = connection.servers.create(:image_id => "ami-76f0061f", :key_name => 'YourKey', :flavor_id => 't1.micro') | |
server.reload # see how we are doing | |
server.ready? # true when ready |
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
// Convert to bookmarklet, run script. You should get download links for your video! | |
(function() { | |
if (document.getElementById('download-youtube-video')) return; | |
var args = null, | |
video_title = null, | |
video_id = null, | |
video_hash = null; | |
var download_code = new Array(); | |
var fmt_labels = { | |
'18': 'standard MP4', |
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
# Deploying chef with capistrano | |
# Requires a typical chef config layout, i.e. | |
# cookbooks/ | |
# nodes/ | |
# roles/ | |
# | |
# Commands: | |
# configure:<node> - Upload chef cookbooks, run chef-solo | |
# | |
# Roles will automatically be added from nodes/*.json. e.g. if you have |

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 ruby | |
# hubscore | |
# Scores a project on github based on keyword metrics. | |
# Higher score = faster/in fashion. Lower score = slower/out of date. | |
# | |
# Usage: | |
# hubscore socketstream/socketstream | |
# | |
require 'rubygems' | |
require 'open-uri' |