Skip to content

Instantly share code, notes, and snippets.

View jstirk's full-sized avatar

Jason Stirk jstirk

View GitHub Profile
@jstirk
jstirk / example.rb
Created May 25, 2012 03:17 — forked from mikel/example.rb
Range Fun in Ruby
(-10..-5).include?(-7)
#=> true
(-5..-10).include?(-7)
#=> false
(10..5).include?(7)
#=> false
(5..10).include?(7)
#=> true
# OK, so maybe 10..5 wraps the whole set of integers?
@jstirk
jstirk / rcov.rake
Created January 11, 2011 06:41 — forked from alexdreher/rcov.rake
rcov rake task for Rails 3, cucumber, rspec
# Forked to get it working with Rails 3 and RSpec 2
# Updated to aggregate Cucumber and rspec correctly
# Updated to not fail in production when Cucumber, rspec aren't available
#
# From http://github.com/jaymcgavren
#
# Save this as rcov.rake in lib/tasks and use rcov:all =>
# to get accurate spec/feature coverage data
#
# Use rcov:rspec or rcov:cucumber
@jstirk
jstirk / checker.erb
Created October 15, 2009 22:50 — forked from ocean/checker.erb
<h1>Feeds Checker</h1>
<%
require 'hpricot'
require 'open-uri'
f1 = open("http://www.commerce.wa.gov.au/feeds/feed1.xml")
feed = Hpricot.XML(f1)