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
/* | |
Inspired by https://www.viget.com/articles/check-your-breakpoint-using-this-simple-css-snippet | |
*/ | |
body:after { | |
color: #000; | |
font-family: Helvetica; | |
font-size: 12px; | |
padding: 5px; | |
font-weight: bold; |
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
=begin | |
Include in your rspec config like so: | |
RSpec.configure do |spec| | |
spec.include RSpec::RedisHelper, redis: true | |
end | |
This helper will clean redis around each example. | |
=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
# Simple web service that looks for an image metadata record on a MySQL db given its ID and sends it back in JSON | |
# | |
# Ruby 1.9.3 | |
# All gems updated to the most recent version | |
# MBP i5 8gb Lion | |
# | |
# See source code above, combo is: | |
# Sinatra + Thin: | |
# - mysql_db.rb # mysql2 api class | |
# - sinatra_thin_server.rb |
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 Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |