Skip to content

Instantly share code, notes, and snippets.

View JonRowe's full-sized avatar
💭
⛵️

Jon Rowe JonRowe

💭
⛵️
View GitHub Profile
<script type="text/javascript">
// FORK IDEA
// By wrapping in try catch you can fallback to Typekit's default JS if they change the experimental feature.
try
{
// *** EXPERIMENTAL ***
//
// This is an experimental method to be notified when Typekit's fonts have loaded.
@JonRowe
JonRowe / Gemfile
Created January 26, 2010 14:10
Gemfile to allow bundling Merb 1.0.15 via Bundler... read symlink instructions...
# This Gemfile is a cheat
# It allows bundling via bundler using Merb 1.0.15
# To use this you *MUST* symlink gems/gems to gems/ruby/1.8/gems etc.
# I recommend symlinking gems/gems gems/cache gems/specification gems/doc just to be sure
bundle_path "gems"
bin_path "bin"
def self.dependency(*args)
gem(*args)
ls -al /usr/llvm-gcc-4.2/bin/
total 9280
drwxrwxr-x 11 root admin 374 20 Jan 06:46 .
drwxrwxr-x 7 root admin 238 20 Jan 06:45 ..
-rwxrwxr-x 1 root admin 201664 20 Jan 06:45 gcov-4.2
-rwxrwxr-x 1 root admin 859664 20 Jan 06:45 i686-apple-darwin10-llvm-g++-4.2
-rwxrwxr-x 1 root admin 851472 20 Jan 06:45 i686-apple-darwin10-llvm-gcc-4.2
-rwxrwxr-x 1 root admin 182512 20 Jan 06:45 llvm-c++-4.2
-rwxrwxr-x 1 root admin 562896 20 Jan 06:45 llvm-cpp-4.2
class Capybara::Driver::RackTest
private
def env
env = {}
begin
env["HTTP_REFERER"] = request.url
env["HTTPS"] = "on" if request.url =~ /^https/
rescue Rack::Test::Error
# no request yet
end
#Based upon capybara 0.3.5, the important part is the path_check method
class Capybara::Driver::RackTest
def visit(path, attributes = {})
path = path_check path
return if path.gsub(/^#{current_path}/, '') =~ /^#/
get(path, attributes, env)
follow_redirects!
cache_body
end
/Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/core_ext/time/calculations.rb:101:in `advance': undefined method `advance' for #<Date 2010-09-08> (NoMethodError)
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/time_with_zone.rb:316:in `method_missing'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/time_with_zone.rb:242:in `advance'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/duration.rb:91:in `block in sum'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/duration.rb:86:in `each'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/duration.rb:86:in `inject'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/duration.rb:86:in `sum'
from /Users/jrowe/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/duration.rb:62:in `since'
from /U
From c389e8dabd9bf6c5ede8191eb6c453407b92442b Mon Sep 17 00:00:00 2001
From: Jon Rowe <[email protected]>
Date: Fri, 10 Sep 2010 16:28:23 +0100
Subject: [PATCH] write in binmode if the object is binary encoded
---
lib/dragonfly/temp_object.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/dragonfly/temp_object.rb b/lib/dragonfly/temp_object.rb
Process: Google Chrome [1043]
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Identifier: com.google.Chrome
Version: 6.0.472.62 (472.62)
Code Type: X86 (Native)
Parent Process: launchd [93]
Date/Time: 2010-09-22 11:42:38.799 +0100
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
~$ rvm gemset create new_gemset
'new_gemset' gemset created (/Users/jrowe/.rvm/gems/ruby-1.9.2-p0@new_gemset).
~$ rvm use 1.9.2@new_gemset
Using /Users/jrowe/.rvm/gems/ruby-1.9.2-p0 with gemset new_gemset
~$ gem list
*** LOCAL GEMS ***
rake (0.8.7)
rdoc (2.5.11)
@JonRowe
JonRowe / rspec_core_230_patch_jonrowe_14122010.diff
Created December 14, 2010 15:08
RSpec-Core 2.3.0 autotest failed spec regular expression fix for colour
From fa82095f0928decfeead82341959d7e451fd16aa Mon Sep 17 00:00:00 2001
From: Jon Rowe <[email protected]>
Date: Tue, 14 Dec 2010 15:01:10 +0000
Subject: [PATCH] add spec for checking coloured output and regular expression that matches both coloured and non coloured output
---
lib/autotest/rspec2.rb | 2 +-
spec/autotest/failed_results_re_spec.rb | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletions(-)