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 | |
require 'fog' | |
connection = Fog::Compute.new({ | |
:provider => 'rackspace', | |
:rackspace_username => ENV['RACKSPACE_API_USERNAME'], | |
:rackspace_api_key => ENV['RACKSPACE_API_KEY'], | |
:version => :v2, | |
:rackspace_region => :ord |
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
# The videos can be found at http://programme.scottishrubyconference.com/schedule | |
# Usage: ruby download_scotruby_videos.rb /path/to/directory | |
page = "http://video2012.scotlandonrails.com" | |
path = ARGV.first || '.' | |
[ | |
[ "Continuous Delivery - A Better Software Deployment Strategy", "D1_GH_01-Ruby1280_b.mp4" ], | |
[ "The Rails View: The Junk Drawer Grows Up", "D1_GH_02-Ruby1280_b.mp4" ], | |
[ "Perfectionists Anonymous", "D1_GH_03-Ruby1280_b.mp4" ], | |
[ "ElasticSearch, AMQP and Ruby; or how I learned to stop spelunking and love the logs", "D1_GH_04-Ruby1280_b.mp4" ], |
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
### | |
A meta-compilation of: | |
https://raw.github.com/gist/1453705/d253733a56632a8d2c29321a75c18b627fa4dda8/reserved_usernames.rb | |
http://blog.postbit.com/reserved-username-list.html | |
http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features | |
(Took out some company-specific terms at the top of the first one (e.g. imulus, stacks), added one term so far - 'edits'.) | |
NOTE: Does not include profanities. You may or may not want to add a list of those. | |
(See https://www.google.com/search?q=profanity+list, but don't try to apply regexp's here because Scunthorpe - http://en.wikipedia.org/wiki/Scunthorpe_problem) |
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
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version | |
# see https://github.com/defunkt/resque/issues/49 | |
# see http://redis.io/commands - new commands | |
namespace :resque do | |
desc "Clear pending tasks" | |
task :clear => :environment do | |
queues = Resque.queues | |
queues.each do |queue_name| | |
puts "Clearing #{queue_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
# | |
# Cookbook Name:: jenkins | |
# Recipe:: default | |
# | |
# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu | |
# This is super-simple, compared to the other Chef cookbook I found | |
# for Jenkins (https://github.com/fnichol/chef-jenkins). | |
# | |
# This doesn't include Chef libraries for adding Jenkin's jobs via |
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
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
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
module Heroku | |
class StaticAssetsMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
# call returns an array containing [response code, header, Rack::Response] | |
reply = @app.call(env) |
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 | |
PASTEL='{ | |
"Ansi 0 Color" = { | |
"Blue Component" = 0.3097887; | |
"Green Component" = 0.3097887; | |
"Red Component" = 0.3097887; | |
}; | |
"Ansi 1 Color" = { | |
"Blue Component" = 0.3764706; |