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
% rspec spec/models/user_spec.rb | |
.F.F. | |
Failures: | |
1) User | |
Failure/Error: it { should query :where => {:name => 'bar'} } | |
expected [:where] to query {:where=>{:name=>"bar"}} | |
# ./spec/models/user_spec.rb:6 |
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
<?php | |
define( 'MY_CPT', 'actor' ); | |
/** | |
* Redirects /cary-grant/ to /actor/cary-grant/ or whatever the correct URL is | |
*/ | |
function redirect_old_cpt_urls() { | |
if ( !is_404() ) | |
return; |
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
<<-README | |
Put this here /spec/javascripts/support/jasmine_extensions | |
The observed and output folders are set up for Rails, but there's no reason | |
you couldn't change them to work with any DOM-generating back-end. | |
Also, we found it helpful to clean the html we wrote to these fixtures by | |
remove script tags and changing the body to a div, so it fit nicely into the | |
jasmine_content div. |
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
Jeremy | |
Absolutely brilliant | |
both technically | |
and oratorically | |
He wrote CoffeeScript | |
1st place 5k | |
21 min, 3 seconds | |
<7min mile | |
Big picture |
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 'yaml' | |
require 'logger' | |
require 'active_record' | |
namespace :db do | |
def create_database config | |
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
create_db = lambda do |config| | |
ActiveRecord::Base.establish_connection config.merge('database' => nil) |
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
def parse(name) | |
case name | |
when /^\[(.+)\](.+)\[(.+)\]$/ | |
[ $1 + $2 + $3, $1 + $2, $2 + $3, $2 ] | |
when /^\[(.+)\](.+)$/ | |
[ $1 + $2, $2 ] | |
when /^(.+)\[(.+)\]$/ | |
[ $1, $1 + $2 ] | |
else | |
[ 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
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux] | |
curb (0.6.2.1) | |
em-http-request (0.2.5) | |
eventmachine (0.12.10) | |
typhoeus (0.1.13) | |
user system total real Memory (Kb) | |
4kb std | |
0.000000 0.000000 3.010000 ( 22.408594) 24,484 |