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
module Abominate | |
def replace_object new_object | |
raise Exception.new( "Ia! Ia! Cthulhu Fhtagn!" ) unless instance_variable_defined? "@i_know_this_is_an_abomination" | |
context = class << self ; self ; end | |
new_object.instance_variables.each do |var| | |
instance_variable_set( var, new_object.instance_variable_get( var ) ) | |
end |
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
source 'http://rubygems.org' | |
gem 'sunzi' | |
gem 'rake' | |
gem 'fog' |
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
set :stage, 'production' | |
set :shared_children, shared_children << 'tmp/sockets' | |
puma_sock = "unix://#{shared_path}/sockets/puma.sock" | |
puma_control = "unix://#{shared_path}/sockets/pumactl.sock" | |
puma_state = "#{shared_path}/sockets/puma.state" | |
puma_log = "#{shared_path}/log/puma-#{stage}.log" | |
namespace :deploy do | |
desc "Start the application" |
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/bash | |
# get-docker-socket-from-remote <name> <user>@<host> | |
# Create a unix socket at /tmp/<name>-docker.sock which, when | |
# used will ssh to <user>@<host> and connect to the docker | |
# socket at <host>:///var/run/docker.sock | |
# Note: | |
# 1. This forks a subjob that manages the local socket. | |
# Rmember to kill that when your finished |