Skip to content

Instantly share code, notes, and snippets.

View michaelengland's full-sized avatar

Michael England michaelengland

View GitHub Profile
module Waiter
extend self
TIMEOUT = 15
def wait_until(opts = {}, &block)
raise 'Need a block' unless block
timeout = opts[:timeout] || TIMEOUT
poll_sleep = opts[:poll_sleep] || 0.5
message = opts[:message] || "timed out waiting: timeout = #{timeout}, poll_sleep = #{poll_sleep}"
@michaelengland
michaelengland / SEHumanizedTimeDiff.podspec
Created February 12, 2013 09:06
Podspec for more recent version of SEHumanizedTimeDiff
Pod::Spec.new do |s|
s.name = 'SEHumanizedTimeDiff'
s.version = '1.0.0'
s.summary = 'SEHumanizedTime with customizable date mode.'
s.author = { 'Sarp Erdag' => 'sarp.erdag@apperto.com' }
s.source = { :git => 'https://github.com/sarperdag/SEHumanizedTimeDiff.git' }
s.source_files = 'SEHumanizedTime/*.{h,m}'
end
@michaelengland
michaelengland / production
Created August 1, 2012 14:07
GA Duplication
<script>
//<![CDATA[
(function(w, d, t){
var g=d.createElement(t), s=d.getElementsByTagName(t)[0], winLocation = w.location;
w._gaq=[["_setAccount","UA-22442278-1"],["_setDomainName","dev.wimdu.com"], ["_setAllowLinker",true]];
w._gaq.push(["overall._setAccount","UA-22442278-75"],["overall._setAllowLinker",true]);
g.async=true;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)}
16:50 ~/Documents/wimdu/rails/wimdu (master *+)$ cap staging_dublin deploy:migrations REVISION=a6c90569f672a8ecb0e71783ab5317f677747c51
* 16:51:48 == Currently executing `staging_dublin'
triggering start callbacks for `deploy:migrations'
* 16:51:48 == Currently executing `multistage:ensure'
* 16:51:48 == Currently executing `deploy:migrations'
* 16:51:48 == Currently executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
=> No depth available for a6c90569f672a8ecb0e71783ab5317f677747c51
=> Using full clone
=> Set revision to a6c90569f672a8ecb0e71783ab5317f677747c51
@michaelengland
michaelengland / create
Created July 3, 2012 13:52
DB Migrate Problem
15:47 ~/Documents/wimdu/rails/wimdu (master *)$ bundle exec rake db:create --trace
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
wimdu_test already exists
wimdu_development already exists