Skip to content

Instantly share code, notes, and snippets.

View cvshepherd's full-sized avatar

Collin Shepherd cvshepherd

  • Hanover, Germany
View GitHub Profile
@joho
joho / deploy.rb
Created September 13, 2012 01:30
How to serve emergency "signed out" views from page cache without affecting signed in users in rails.
set :path_to_repo, "/path_to_repo/"
set :running_app_user, "appusername"
namespace :webscale do
desc "Cache a signed out version of the path. Usage: cap webscale:signed_out_cache_page -s path_to_cache=/films/on_netflix"
task :signed_out_cache, roles: :app do
cache_base_path = "#{path_to_repo}/public/signed_out"
cached_destination_path = "#{cache_base_path}#{path_to_cache}.html"
working_path = "#{cached_destination_path}.tmp"
@bcardarella
bcardarella / gist:1503558
Created December 20, 2011 22:23
List of lame ass companies from First Round Capital Craptacular Christmas "Joke"
http://www.youtube.com/watch?v=HP4HiZt3DFE
path
appnexus
taskrabbit
singleplatform
birchbox
xobni
jelli
memsql