My Recent Pastes (264510 and counting)
All Pasties (over 264,510 and counting)
Pages: 1 … 6919 6920 6921 6922 6923 … 13226
Below are summaries of the most recent pasties.
February 29, 2008
4:33AM EDT
View more (30 lines)
1 2 3 4 5 |
>> d = RootThing.find( 1 ) >> d.name => "default" >> d.name = "new_name" => "new_name" |
February 29, 2008
4:32AM EDT
View more (8 lines)
1 2 3 4 5 |
# Adds a proper line item to this estimate. # Makes sure project_id is set. # def add_line_item(line_item) line_item.estimate_id = self.id |
February 29, 2008
4:23AM EDT
View more (107 lines)
1 2 3 4 5 |
root@host:/home/rgl# mdadm --detail /dev/md3
/dev/md3:
Version : 01.00.03
Creation Time : Wed Dec 19 12:08:40 2007
Raid Level : raid1
|
February 29, 2008
4:01AM EDT
by leethal
1 2 3 4 5 |
class Post def self.find_by_case_insensitive_title(title) find(:first, :conditions => ["LOWER(title) = LOWER(?)", title]) end end |
February 29, 2008
3:59AM EDT
View more (93 lines)
1 2 3 4 5 |
#models class Addressable < ActiveRecord::Base acts_as_nested_set has_one :user |
February 29, 2008
3:53AM EDT
View more (13 lines)
1 2 3 4 5 |
function __is_top_level($c) {
return $c->category_parent == 0;
}
function __categories_as_list($c) {
|
February 29, 2008
3:53AM EDT
View more (13 lines)
1 2 3 4 5 |
function __is_top_level($c) {
return $c->category_parent == 0;
}
function __categories_as_list($c) {
|
February 29, 2008
3:51AM EDT
View more (6 lines)
1 2 3 4 5 |
#!/bin/bash for i in `seq 1 2000`; do beep -f $i -l 10 beep -f $i/2 -l 10 |
February 29, 2008
3:49AM EDT
View more (37 lines)
1 2 3 4 5 |
def update @post = Post.find(params[:id]) if @validatesuccess == 'YES' respond_to do |format| if @post.update_attributes(params[:post]) |
February 29, 2008
3:48AM EDT
View more (20 lines)
1 2 3 4 5 |
def update @post = Post.find(params[:id]) if @validatesuccess == 'YES' respond_to do |format| if @post.update_attributes(params[:post]) |
February 29, 2008
3:45AM EDT
View more (25 lines)
1 2 3 4 5 |
class Maillog < ActiveRecord::Base belongs_to :addressables, :foreign_key => 'sender_id' belongs_to :user, :foreign_key => 'creator' has_many :receivers has_many :addressables, :through => :receivers |
February 29, 2008
3:43AM EDT
View more (23 lines)
1 2 3 4 5 |
>> m.save NoMethodError: undefined method `new_record?' for #<Class:0xb78ae0dc> from /usr/local/rdgest/vendor/rails/activerecord/lib/active_record/base.rb:1532:in `method_missing' from /usr/local/rdgest/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:135:in `send' from /usr/local/rdgest/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:135:in `method_missing' |
February 29, 2008
3:35AM EDT
View more (35 lines)
1 2 3 4 5 |
def update @post = Post.find(params[:id]) if @validatesuccess == 'YES' respond_to do |format| if @post.update_attributes(params[:post]) |
February 29, 2008
3:35AM EDT
View more (12 lines)
1 2 3 4 5 |
# deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release amd64 (20071016.1)]/ gutsy main restricted deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse |
February 29, 2008
3:18AM EDT
View more (13 lines)
1 2 3 4 5 |
;+--------------------------------------------------------------------------- ;| PHP-IRC madden module Function Configuration File ;+--------------------------------------------------------------------------- file madden modules/madden/madden.php |
February 29, 2008
3:15AM EDT
View more (94 lines)
1 2 3 4 5 |
#!/usr/bin/dmd -run /* sh style script syntax is supported */ /* Hello World in D To compile: |
February 29, 2008
3:01AM EDT
View more (37 lines)
1 2 3 4 5 |
<ul style="list-style-type:none">
<?php if (!$alreadyMentoringContact && !$ownProfile) : ?>
<li style="float:left"><?php echo $html->link(__('Add as mentor or mentee', true), '/contacts/mentoringrequest/' . $profile['Profile']['user_id']); ?></li>
<?php else : ?>
<li style="float:left"><div style="color:#ccc"><?php __('Add as mentor or mentee'); ?></div></li>
|
February 29, 2008
3:00AM EDT
View more (331 lines)
1 2 3 4 5 |
<?php //+--------------------------------------------------------------------------- //| PHP-IRC dice rolling Mod 0.1 //| ======================================= //+--------------------------------------------------------------------------- |
February 29, 2008
2:56AM EDT
View more (23 lines)
1 2 3 4 5 |
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
|
February 29, 2008
2:56AM EDT
View more (19 lines)
1 2 3 4 5 |
I just upgraded to Rails 2.0.2. I now get the error: You have a nil object when you didn't expect it! |
Pastie