Skip to content

Instantly share code, notes, and snippets.

Pedro Belo pedro

Block or report user

Report or block pedro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View retry_upto.rb
# Ruby's `retry` with steroids:
# - retry up to 5 times without waiting between them and retrying after any exception
# retry_upto(5) do ... end
# - retry up to 5 times, waiting 2 seconds between retries and retrying after any exception
# retry_upto(5, :wait => 2) do ... end
View gist:137834
require 'sinatra'
require 'builder'
def home
content_type 'text/xml', :charset => 'utf-8'
builder do |xml|
xml.Response do
xml.Gather("numDigits" => "1", "action" => "press", "method" => "POST") do
xml.Say "For a good time, press 1"
View *scratch*
remote ='')
You can’t perform that action at this time.