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
# BEFORE | |
def validate_password_with_openid? | |
!using_openid? && require_password? | |
end | |
# AFTER | |
def validate_password_with_openid? | |
require_password? | |
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
Results 210.50 | |
System Info | |
Xbench Version 1.3 | |
System Version 10.6.1 (10B504) | |
Physical RAM 3072 MB | |
Model MacBookPro2,1 | |
Drive Type INTEL SSDSA2M160G2GC | |
Disk Test 210.50 | |
Sequential 132.18 | |
Uncached Write 145.15 89.12 MB/sec [4K blocks] |
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
# -*- encoding: utf-8 -*- | |
$:.push File.expand_path("../lib", __FILE__) | |
require "example_gem/version" | |
Gem::Specification.new do |s| | |
s.name = "example_gem" | |
s.version = ExampleGem::VERSION | |
s.platform = Gem::Platform::RUBY | |
s.authors = ["Name"] | |
s.email = ["Email"] |
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
<false> is not true. (Test::Unit::AssertionFailedError) | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:48:in `assert_block' | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:500:in `_wrap_assertion' | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:46:in `assert_block' | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:63:in `assert' | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:495:in `_wrap_assertion' | |
/Users/matthooks/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/test/unit/assertions.rb:61:in `assert' | |
./features/step_definitions/contact_search_steps.rb:115:in `/^I should see contacts contacted more than two weeks ago$/' | |
features/contacts_search.feature:75:in `Then I should see contacts contacted more than two weeks ago' |
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
# BAD | |
function1 = -> | |
console.log('stuff') | |
$(function1) | |
function2 = (parameter1) -> | |
console.log(parameter1) | |
$(function2) |
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
html = """ | |
This is a string in which you can insert #{stuff} and have many double quotes """""" without having to do \" to escape them | |
""" | |
html = """ | |
<iframe id="#{id}_form" style="display:#{(!visible && 'none') || 'auto'}; width:400px; height:50px; border:0; overflow:hidden;" border="0" frameborder="0" scrolling="no" src="/attachments/new?target=#{id}&name=#{escape $attachment.val()}"></iframe> | |
""" |
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
module CounterCache | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def counter_cache(field) | |
class_eval <<-EOF | |
after_create "increment_counter_for_#{field}" | |
after_destroy "decrement_counter_for_#{field}" | |
EOF | |
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
firing pixel: http://p.nowspots-staging.com/event?ids=s%3A4ecab288b14b360001000067%2Ct%3A4de6f1b569db40775a000001%2Ca%3A4eb845059079f90001000002%2Cp%3A4ebd83d2d2f0160010000003&actions=profile-click&elapsed=381278&cb=1321908267111&url=http%3A//ads_app.dev/&stream=bszz |
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
{ | |
"content": { | |
"field_groups": [ | |
{ | |
"keys": ["username"], | |
"repeat": false | |
} | |
] | |
}, | |
"settings": { |
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
Server Software: thin | |
Server Hostname: localhost | |
Server Port: 5000 | |
Document Path: /serve?username=nowspots | |
Document Length: 3070 bytes | |
Concurrency Level: 10 | |
Time taken for tests: 146.587 seconds | |
Complete requests: 10000 |