This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake aborted! | |
You have a nil object when you didn't expect it! | |
You might have expected an instance of ActiveRecord::Base. | |
The error occurred while evaluating nil.[] | |
/usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:1006:in `id_from_response' | |
/usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:993:in `create' | |
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb:39:in `returning' | |
/usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:992:in `create' | |
/usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:793:in `save_without_validation' | |
/usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/validations.rb:248:in `save' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> u.core_user.reload | |
ArgumentError: expected an attributes Hash, got #<Sgcore::User::Group:0x5402838 @prefix_options={}, @attributes={"name"=>"Sent Invite", "group_type_id"=>nil, "updated_at"=>Thu Feb 19 18:31:39 UTC 2009, "id"=>23, "group_id"=>"23", "user_id"=>"11", "created_at"=>Thu Feb 19 18:31:39 UTC 2009}> | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:939:in `load' | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:653:in `initialize' | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:946:in `new' | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:946:in `load' | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:946:in `map' | |
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.2.2/lib/active_resource/base.rb:946:in `load' | |
from /usr/local/lib/ruby/gems/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# svn export | |
git checkout-index -a -f --prefix=/destination/path/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# merge pdfs | |
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=assignment06.pdf pt1.pdf pt2.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
n = 100000 | |
Benchmark.bm do |x| | |
x.report('copy') { n.times do ; h = {}; h = h.merge({1 => 2}); end } | |
x.report('no copy') { n.times do ; h = {}; h.merge!({1 => 2}); end } | |
x.report('aha') { n.times do; puts 'your shit here'; end } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fg -hl (to get dev name) | |
sudo fsck_hfs -l /dev/DEV_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain system local user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fs_usage -f filesys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/CoreServices/SystemVersion.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su - postgres | |
cd /usr/local/pgsql/bin | |
./postmaster -D /usr/local/pgsql/data & |
OlderNewer