Skip to content

Instantly share code, notes, and snippets.

View adimircolen's full-sized avatar

Adimir Colen adimircolen

View GitHub Profile
@adimircolen
adimircolen / aws_cf_invalidate.rb
Created November 22, 2011 22:20 — forked from objectoriented/aws_cf_invalidate.rb
Ruby script to invalidate objects on Amazon's CloudFront CDN (shows status of recent requests also)
require 'rubygems'
require 'hmac-sha1' # on OS X: sudo gem install ruby-hmac
require 'net/https'
require 'base64'
#
# CHANGE ME: S3 access credentials go here, along with CloudFront Distribution ID
#
s3_access=''
s3_secret=''
@jjb
jjb / gist:950975
Created May 1, 2011 23:16
Using whenever with capistrano and bundler in multiple environments
We couldn’t find that file to show.
@carlosantoniodasilva
carlosantoniodasilva / gist:701163
Created November 15, 2010 23:21
Rails 3.0.2 "visit_Foo" Arel error
require 'rubygems'
require 'sqlite3'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3', :database => ':memory:'
)
ActiveRecord::Schema.define(:version => 0) do
create_table :users, :force => true do |t|
@tmm1
tmm1 / gist:329682
Created March 11, 2010 21:31
EM Chat Server Demo
require 'rubygems'
require 'eventmachine'
require 'em-http' # gem install em-http-request
require 'yajl' # gem install yajl-ruby
class String
def bold
"\033[1m#{self}\033[0m"
end
end