My Recent Pastes (236706 and counting)

All Pasties (over 236,706 and counting)

Pages: 1 8539 8541 8543 11836

Below are summaries of the most recent pasties.

July 05, 2007
1:23PM EDT

1
2
3
4
5
module LicoriceModel

  def included(base)
    base.class_eval do
      include LicoriceModel::InstanceMethods

July 05, 2007
1:18PM EDT

1
2
3
4
5
#!/usr/bin/perl
# oneliner  would be nice

use Digest::MD5 qw(md5 md5_hex);

July 05, 2007
1:16PM EDT

1
2
3
4
5
module LicoriceModel
  module InstanceMethods
    def l(key, options={})
      options[:context] ||= self.class.to_s.underscore
      Licorice.instance.l(key, options)

July 05, 2007
1:02PM EDT

1
2
3
4
5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>

July 05, 2007
1:02PM EDT

1
2
3
4
5
select_with_not_required_include_blank_not_allow_other:
  id: 10009
  person_database_id: 1
  name: Select Corner Case
  data_type_id: 4

July 05, 2007
1:01PM EDT

1
2
3
4
5
  def test_select_with_not_required_include_blank_not_allow_other
    assert p = Person.new(:person_database_id => 1,
                          :email_address => 'hma@hma.com',
                          :select_corner_case => 'Hello')
    assert p.save

July 05, 2007
12:58PM EDT

1
2
3
4
search()
{ 
  find . | grep .rb$ | xargs grep "$1"
}

July 05, 2007
12:49PM EDT

1
2
3
4
5
class Module
  # Encapsulates the common pattern of:
  #
  #   alias_method :foo_without_feature, :foo
  #   alias_method :foo, :foo_with_feature

July 05, 2007
12:45PM EDT

1
2
3
4
5
/** 
 * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

July 05, 2007
12:45PM EDT

1
2
3
4
5
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in `method_missing'
#{RAILS_ROOT}/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb:8:in `included'
#{RAILS_ROOT}/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:85:in `has_attachment'
#{RAILS_ROOT}/app/models/photo.rb:8
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load'

July 05, 2007
12:40PM EDT
by Jan Kassens

1
2
3
4
5
Index: /Users/jan/webdev/moodev/mootools/trunk/Native/String.js
===================================================================
--- /Users/jan/webdev/moodev/mootools/trunk/Native/String.js        (revision 742)
+++ /Users/jan/webdev/moodev/mootools/trunk/Native/String.js        (working copy)
@@ -38,13 +38,13 @@

July 05, 2007
12:39PM EDT

1
2
3
4
5
module Taggable
        def self.included(base) #:nodoc:
                base.extend(ClassMethods)  
        end

July 05, 2007
12:37PM EDT

1
2
3
4
5
module Taggable
        def self.included(base) #:nodoc:
                base.extend(ClassMethods)  
#                base.tag_initialize
        end

July 05, 2007
12:23PM EDT

1
2
3
4
5
require 'rake'

task :clean do
  Dir['*.n'].each do |n|
    puts "Removing #{n}"

July 05, 2007
12:22PM EDT

1
2
3
4
5
<VirtualHost 161.58.211.18:80>
    ServerName intranet.mydomain.com
    ServerAdmin root@mydomain.com

    ErrorLog /usr/local/apache2/logs//intranet.mydomain.com-error.log

July 05, 2007
12:18PM EDT

1
#Bwarg

July 05, 2007
12:18PM EDT

1
2
3
4
5
##strikeiron_phoneeval.rb
#Include require libraries
require 'yaml'
require 'soap/wsdlDriver'

July 05, 2007
12:07PM EDT

1
2
3
4
5
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Apache 2</ShortName>
<Description>Apache 2</Description>
<InputEncoding>ISO-8859-1</InputEncoding>

July 05, 2007
12:05PM EDT
by Patrick Hurley

1
2
3
4
5
# free space
df = `df`
df.each_line do |line|
  if line.match(/^(\S*).*?(\d+)\%/)

July 05, 2007
12:03PM EDT

1
2
3
4
5
# lib/tasks/foo.rake

desc 'This is the foo task'
task :foo => :environment do
  Graphic.find_by_id(1)

Next page

Previous page