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
| development: | |
| adapter: postgresql | |
| encoding: unicode | |
| database: my_store_development | |
| username: my_store | |
| production: | |
| adapter: postgresql | |
| encoding: unicode | |
| database: my_store_production |
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
| def obtain_class | |
| class_name = ENV['CLASS'] || ENV['class'] | |
| raise "Must specify CLASS" unless class_name | |
| @klass = Object.const_get(class_name) | |
| end | |
| def obtain_attachments | |
| name = ENV['ATTACHMENT'] || ENV['attachment'] | |
| raise "Class #{@klass.name} has no attachments specified" unless @klass.respond_to?(:attachment_definitions) | |
| if !name.blank? && @klass.attachment_definitions.keys.include?(name) |
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
| Exception | |
| Error | |
| stack level too deep | |
| (eval):1:in `get' | |
| (eval):1:in `get' | |
| /home/maiz/.gem/ruby/1.8/gems/redisk-0.2.0/lib/redisk/stat.rb:359:in `read_attribute' | |
| /home/maiz/.gem/ruby/1.8/gems/redisk-0.2.0/lib/redisk/stat.rb:292:in `size' | |
| /home/maiz/.gem/ruby/1.8/gems/redisk-0.2.0/lib/redisk/io.rb:23:in `initialize' | |
| /home/maiz/.gem/ruby/1.8/gems/redisk-0.2.0/lib/redisk/logger.rb:11:in `new' |
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
| $('input#id-do-meu-campo').daterangepicker() |
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
| require 'RMagick' | |
| img = Magick::ImageList.new( logo ) | |
| white = 768 | |
| expected_saturation = white*0.65 | |
| colors = [] | |
| img.quantize(30).color_histogram.each{|c| | |
| r,g,b = [c[0].red, c[0].green, c[0].blue].map{|c| c/256 } | |
| soma = r + g + b | |
| points = 0 |
NewerOlder