My Recent Pastes (454 and counting)

Recent Pasties by ezmobius (454 and counting)

Pages: 1 3 4 5 31

Below are summaries of the 15 most recent pasties by ezmobius.

November 04, 2008
1:37PM EDT
by ezmobius

1
2
3
4
5
module Awsm
  class ExampleGroup < Merb::Test::ExampleGroup
    before(:each) do
      @transaction = DataMapper::Transaction.new(repository(:default))
      @transaction.begin

October 31, 2008
4:35PM EDT
by ezmobius

1
2
3
scope.resources :foos do
  scope.resources :bars
end

October 27, 2008
3:40PM EDT
by ezmobius

1
2
3
4
5
  def self.parse_gems
    hsh={}
    last = ''
    `gem list -r -a`.each do |line|
      case line

August 18, 2008
3:34PM EDT
by ezmobius

1
2
3
4
5
begin
  require 'eventmachine'
rescue LoadError
  require 'rubygems'
  require 'eventmachine'

August 18, 2008
3:34PM EDT
by ezmobius

1
2
3
4
5
EMFORK = $0 == __FILE__

if EMFORK
  require 'rubygems'
end

July 03, 2008
9:29PM EDT
by ezmobius

1
2
3
4
5
#!/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

1
2
3
4
5
#!/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

1
2
3
4
5
http {
    geo  $assholes  {
         87.21.23.23  1;
         87.21.23.25  1;
     }

June 30, 2008
8:18PM EDT
by ezmobius

1
2
3
4
5
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

1
2
3
4
5
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

1
2
3
4
5
>> x = Module.new
=> #<Module:0x3d7a20>
>> x.name
=> ""
>> FOO = x

June 27, 2008
2:03AM EDT
by ezmobius

1
2
3
4
5
>> def a 
>>   yield
>> end
=> nil
>> a { 42 }

June 26, 2008
2:25PM EDT
by ezmobius

1
2
3
4
5
#!/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

1
2
3
4
5
+++ 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

1
2
3
4
 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

Next page