These two matchers are referenced from the blog post Segment.io and Ruby.
This file contains hidden or 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
-- ghc -O --make BenchStringToInt.hs && ./BenchStringToInt --output bench_string_to_int.html&& open bench_string_to_int.html | |
import Criterion.Main | |
import Data.Maybe (fromMaybe) | |
import Text.Parsec (parse) | |
import Text.Parsec.Token (makeTokenParser, integer) | |
import Text.Parsec.Language (haskellStyle) | |
import Data.Char (digitToInt, isDigit) | |
main = defaultMain [ |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
$tablet: new-breakpoint(max-width 768px 8); | |
$mobile: new-breakpoint(max-width 480px 8); | |
li.location { | |
@include span-columns(4); | |
@include omega(3n); | |
@include media($tablet) { | |
@include span-columns(4); | |
@include omega(2n); |
This file contains hidden or 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
[ ~/dev/gems/factory_girl master ] ✔ rake appraisal:3.2 spec:acceptance ☺ 1.9.3-p429 | |
>> BUNDLE_GEMFILE=/Users/joshuaclayton/dev/gems/factory_girl/gemfiles/3.2.gemfile bundle exec /Users/joshuaclayton/.rbenv/versions/1.9.3-p429/bin/rake spec:acceptance | |
/Users/joshuaclayton/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec spec/acceptance/activesupport_instrumentation_spec.rb spec/acceptance/aliases_spec.rb spec/acceptance/attribute_aliases_spec.rb spec/acceptance/attribute_existing_on_object_spec.rb spec/acceptance/attributes_for_spec.rb spec/acceptance/attributes_from_instance_spec.rb spec/acceptance/attributes_ordered_spec.rb spec/acceptance/build_list_spec.rb spec/acceptance/build_spec.rb spec/acceptance/build_stubbed_spec.rb spec/acceptance/callbacks_spec.rb spec/acceptance/create_list_spec.rb spec/acceptance/create_spec.rb spec/acceptance/define_child_before_parent_spec.rb spec/acceptance/defining_methods_inside_a_factory_spec.rb spec/acceptance/definitio |
This file contains hidden or 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
describe 'Page without plans' do | |
it 'passes unless a second assertion is made that .plans li contains at least one element' do | |
visit root_path | |
all('.plans li').each do |node| | |
expect(node.text).to match /\$\d{1,2}/ | |
end | |
end | |
end |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.joshuaclayton.tmux_copy</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/joshuaclayton/.dotfiles/bin/tmux_copy</string> | |
</array> |
This file contains hidden or 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
/Users/joshuaclayton/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/formatters/base_text_formatter.rb:181:in `dump_failure_info': You have a nil object when you didn't expect it! (NoMethodError) | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.<< |
- 1 1/3 lb grass-fed beef
- 2 tbsp Worcestershire sauce
- 3/4 tsp ground coriander seed
- 1/2 tsp garlic powder
- 1/4 tsp ground cumin
- 4 tbsp softened butter
- 1/2 tsp freshly ground pepper
- 1/2 tsp freshly ground sea salt
- 4 pieces of fresh cheese (Muenster or sharp cheddar are best)
This file contains hidden or 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
factory :post do | |
title "Example Post" | |
body "This is the body of the example post" | |
meta { { version: 2 } } | |
# or | |
meta({ version: 2 }) | |
created_at "2012-06-01 17:53:13" | |
end |