Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Timberlake andrewtimberlake

View GitHub Profile
View gist:600853
Started GET "/" for XXX.XXX.XXX.XXX at Tue Sep 28 11:56:10 +0000 2010
<database lookup>
filter: before calling env: 1285674970
Processing by DefaultController#index as HTML
around_filter in ApplicationController: 1285674991
<database lookup>
DefaultController#index start: 1285674991
Rendered accounts/_sign_up_form.haml (43.2ms)
Rendered shared/_flash.haml (0.2ms)
Rendered default/index.haml within layouts/application (47.7ms)
View gist:140039
process_definition :name => 'Trace Confirmation', :revision => '1' do
sequence do
iterator :on_value => (0..5).to_a.join(','), :to_variable => 'i' do
sequence do
_break :if => "${i} is 5"
debug
#This could happen from a received phone call while
View gist:139970
process_definition :name => 'Trace Confirmation', :revision => '1' do
sequence do
iterator :on_value => (0..5).to_a.join(','), :to_variable => 'i' do
sequence do
_break :if => "${i} is 5"
debug
_break :if => "${f:complete} == true"
View gist:108096
undefined method `register_participant' for nil:NilClass
/home/andrew/dev/ruote-test/ruote-rest/lib/part.rb:81:in `register'
/home/andrew/dev/ruote-test/ruote-rest/lib/part.rb:63:in `add'
/home/andrew/dev/ruote-test/ruote-rest/lib/res/participants.rb:51:in `call'
/home/andrew/dev/ruote-test/ruote-rest/vendor/rufus-sixjo/lib/rufus/sixjo.rb:267:in `service'
/home/andrew/dev/ruote-test/ruote-rest/vendor/rufus-sixjo/lib/rufus/sixjo.rb:265:in `catch'
/home/andrew/dev/ruote-test/ruote-rest/vendor/rufus-sixjo/lib/rufus/sixjo.rb:265:in `service'
/home/andrew/dev/ruote-test/ruote-rest/vendor/rufus-sixjo/lib/rufus/sixjo.rb:125:in `call'
/home/andrew/dev/ruote-test/ruote-rest/lib/auth.rb:50:in `call'
/home/andrew/dev/ruote-test/ruote-rest/lib/auth.rb:56:in `call'
View gist:107469
#My conf/participants file
module RuoteRest
configure do
RuoteRest.engine.register_participant :kilroy do
puts 'Kilroy was here'
end
RuoteRest.engine.register_participant :sleepy do
puts "sleeping..."
sleep 10
puts "waking"
View gist:90389
col1 = []
col2 = []
col3 = []
col4 = []
col5 = []
File.open("C:\\Documents and Settings\\Desktop\\test.txt", "r") do |infile|
while(line = infile.gets)
numbers = line.split(/\s*,\s*/)
col1 << numbers[0].to_i
col2 << numbers[1].to_i
View SOR - Trojan Jedi - Blocks
class AppServerConfiguration
attr_accessor :port, :admin_password
end
class Configuration
attr_accessor :tail_logs, :max_connections, :admin_password
def app_server(&block)
if block_given?
@app_server_config = AppServerConfiguration.new
View gist:47020
columns(2, :width => margin_box.width) do
column do
text "Text for the left column"
end
column do
text "Text for the right column\nthat is more than one line\nso that the right column is larger"
end
end
text "Some text that will be below both columns"
View gist:47014
start_y = y
bounding_box [0, cursor], :width => margin_box.width / 2 do
text "Text for the left column"
end
left_end_y = y
y = start_y
bounding_box [margin_box.width / 2, cursor], :width => margin_box.width / 2 do
text "Text for the right column\nthat is more than one line\nso that the right column is larger"
end
right_end_y = y
View gist:46929
Prawn::Document.generate "test.pdf" do
stroke_horizontal_rule
text "Some text\nwith a line break"
stroke_horizontal_rule
move_down 10
stroke_horizontal_rule
text "Some <b>bold</b> text<br />with a line break"
stroke_horizontal_rule
end