My Recent Pastes (450 and counting)
Pastes by ezmobius (450 and counting)
Below are the 15 most recent pasties by ezmobius.
October 27, 2008
3:40PM EDT
by ezmobius
View all 20 lines
def self.parse_gems hsh={} last = '' `gem list -r -a`.each do |line| case line
August 18, 2008
3:34PM EDT
by ezmobius
View all 50 lines
begin require 'eventmachine' rescue LoadError require 'rubygems' require 'eventmachine'
August 18, 2008
3:34PM EDT
by ezmobius
View all 67 lines
EMFORK = $0 == __FILE__ if EMFORK require 'rubygems' end
July 03, 2008
9:29PM EDT
by ezmobius
View all 193 lines
#!/bin/bash # /engineyard/bin/merb_thin # This script starts and stops a named thin server on a specified socket
July 03, 2008
9:28PM EDT
by ezmobius
View all 193 lines
#!/bin/bash # /engineyard/bin/thin # This script starts and stops a named thin server on a specified socket
July 01, 2008
1:58AM EDT
by ezmobius
View all 23 lines
http {
geo $assholes {
87.21.23.23 1;
87.21.23.25 1;
}
June 30, 2008
8:18PM EDT
by ezmobius
View all 15 lines
now try this on for size. I'm sure you know how this works: > def a > yield > end => nil
June 30, 2008
7:50PM EDT
by ezmobius
View all 13 lines
diff --git a/lib/merb-core/controller/mixins/controller.rb b/lib/merb-core/controller/mixins/controller.rb index abc7bc4..e63ce46 100644 --- a/lib/merb-core/controller/mixins/controller.rb +++ b/lib/merb-core/controller/mixins/controller.rb @@ -150,7 +150,7 @@ module Merb
June 30, 2008
1:29AM EDT
by ezmobius
View all 11 lines
>> x = Module.new => #<Module:0x3d7a20> >> x.name => "" >> FOO = x
June 26, 2008
2:25PM EDT
by ezmobius
View all 7 lines
#!/usr/bin/ruby # don't run from irb. yin = lambda {|foo| puts; foo}.call(callcc {|cc| cc }) yang = lambda {|foo| print "*"; foo}.call(callcc {|cc| cc })
June 20, 2008
5:50PM EDT
by ezmobius
View all 9 lines
+++ b/lib/merb-core/rack/handler/mongrel.rb @@ -49,6 +49,7 @@ module Merb # request<Merb::Request>:: The HTTP request to handle. # response<HTTPResponse>:: The response object to write response to. def process(request, response)
June 20, 2008
4:36PM EDT
by ezmobius
it "should not match a non-existent route" do check_request_for_route(fake_request({:request_uri => "/non-existent/frob\ /1001", :request_method => "GET"})).should raise_error(Merb::ControllerExceptions::BadRequest) end
June 20, 2008
12:19AM EDT
by ezmobius
View all 7 lines
# put this in a file and run it, doesn't work in irb rails = lambda {|foo| puts; foo}.call(callcc {|cc| cc }) rails2 = lambda {|foo| print "*"; foo}.call(callcc {|cc| cc })
May 18, 2008
8:33PM EDT
by ezmobius
View all 16 lines
module MyController def debug2 puts "**Success2**" end
