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
class Image | |
def initialize(arr) | |
@arr = arr | |
end | |
def print | |
@arr.each do |sub_array| | |
puts sub_array.join('') | |
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
Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.8.0 | |
gem uninstall nokogiri -xI; | |
brew update; | |
brew uninstall libxml2; | |
brew install libxml2 --with-xml2-config; | |
brew link libxml2; | |
brew install libxslt; |
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
⮁ ruby benchmark.rb > benchmark.txt | |
benchmark.rb:33:in `block (3 levels) in <main>': undefined method `push' for #<RR::DoubleDefinitions::DoubleDefinition:0x007fe9aa28e240> (NoMethodError) | |
from benchmark.rb:31:in `times' | |
from benchmark.rb:31:in `block (2 levels) in <main>' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:280:in `measure' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:362:in `item' | |
from benchmark.rb:30:in `block in <main>' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:174:in `benchmark' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:205:in `bm' | |
from benchmark.rb:11:in `<main>' |
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
# stolen from http://gist.github.com/119874 and made a tiny bit more robust by me | |
# this implementation uses haml by default. if you want to use any other template mechanism | |
# then replace `erb` on line 23 and line 31 with `erb` or whatever | |
#This implementation varies from lenary's because it allows a :spacer_string to be specified | |
# a spacer_string works the same way as a :spacer_template in rails, | |
# except instead of rendering a page it plops in a string, | |
# but only in between elements of the collection, not at the end. | |
# This is useful if you have, say, a collection of blog tags, | |
# rendered as a collection of links with commas between them. |