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
def retry_times(exception = StandardError, times = 3, &block) | |
yield | |
rescue Exception => e | |
if times <= 1 || !e.is_a?(exception) | |
raise | |
else | |
sleep(0.5) | |
retry_times(exception, times - 1, &block) | |
end | |
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
// | |
// BarModel.h | |
// MusicalNotation | |
// | |
// Created by August Lilleaas on 8/4/10. | |
// Copyright (c) 2010 Shortcut AS. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
def bundle | |
sudo "#{$0} _#{VERSION}_ install_bundler 1.0.0.rc.3" | |
run "cd #{config.release_path} && bundle _1.0.0.rc.3_ install --deployment --path #{config.shared_path}/bundled_gems" | |
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
gemcutter => redis downloads spec | |
================================= | |
keys | |
---- | |
downloads => global counter for all gem downloads | |
downloads:today => sorted set for downloads from today | |
downloads:rubygem:rails => counter for all rails downloads | |
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads |