My Recent Pastes (738 and counting)

Pastes by leethal (738 and counting)

Pages:

Below are the 15 most recent pasties by leethal.

March 12, 2009
9:09AM EDT
by leethal

# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = %q{rugalytics}
  s.version = "0.1.8"

March 12, 2009
6:04AM EDT
by leethal

<%= list(@people) {|p| link_to p.first_name, person_path(p) } %>

<% list(@people) do |p| %>
  <span><%= p.first_name %></span>
  <p>Uh, yeah, something.</p>

March 12, 2009
3:28AM EDT
by leethal

<% my_helper do %>
  ohai
<% end %>

<%= my_helper { "wtf" } %>

March 12, 2009
2:34AM EDT
by leethal

class Ohai
  def say_it
    puts "Yep!"
  end
end

March 10, 2009
3:54AM EDT
by leethal

module Pwn
  def name
    puts "Oh gosh"
  end
end

March 09, 2009
4:46AM EDT
by leethal

## routes.rb
map.resources :products

## controller
def index

March 08, 2009
9:55AM EDT
by leethal

## Without attr_reader
class Wtf
  def thing
    @thing
  end

March 06, 2009
9:30AM EDT
by leethal

## lib/twitter_fetcher.rb
module TwitterFetcher
  def self.omg_fetch
    puts "Fetching yay lol"
  end

March 05, 2009
8:43AM EDT
by leethal

element = HTML::Node.new("<p>Hello</p>")
selector = HTML::Selector.new("p")
selector.select(element)
# => []

March 05, 2009
5:35AM EDT
by leethal

diff --git a/lib/active_record/acts/list.rb b/lib/active_record/acts/list.rb
index 00d8692..71f1d87 100644
--- a/lib/active_record/acts/list.rb
+++ b/lib/active_record/acts/list.rb
@@ -36,36 +36,14 @@ module ActiveRecord

March 05, 2009
5:32AM EDT
by leethal

module Foo
  def self.ohai
    puts "I am alone."
  end
end

March 04, 2009
9:45AM EDT
by leethal

ActionController::Routing::Routes.draw do |map|
  map.namespace :admin do |admin|
    admin.root :controller => "dashboard"
    
    admin.resource :session

March 04, 2009
9:10AM EDT
by leethal

## 1.8
int
rb_str_hash(str)
    VALUE str;
{

March 04, 2009
8:30AM EDT
by leethal

leethal@haxxor ~/Desktop> ruby -e 'puts "hello".hash.abs'
706225659
leethal@haxxor ~/Desktop> ruby -e 'puts "hello".hash.abs'
706225659
leethal@haxxor ~/Desktop> ruby -e 'puts "hello".hash.abs'

March 02, 2009
3:41PM EDT
by leethal

leethal@haxxor > irb
>> defined?(bar)
=> nil
>> bar = true if false
=> nil

Next page