Skip to content

Instantly share code, notes, and snippets.

View ramon's full-sized avatar
🏠
Working from home

Ramon Soares ramon

🏠
Working from home
View GitHub Profile
@iqbalhasnan
iqbalhasnan / carrierwave.rb
Last active May 25, 2023 06:06
carrierwave mini_magick image processing - quality, strip, exif rotation, gaussian blur, interlace
#config/initializers/carrierwave.rb
module CarrierWave
module MiniMagick
# Rotates the image based on the EXIF Orientation
def exif_rotation
manipulate! do |img|
img.auto_orient
img = yield(img) if block_given?
img
end
@rafaelp
rafaelp / bank_billet.rb
Last active December 20, 2015 00:59
DRAFT WORK! Wrapper for BankBillet model on Cobre Gratis API: https://github.com/BielSystems/cobregratis-api/blob/master/resources/bank_billets.md
class BankBillet
include HTTParty
include Virtus
base_uri 'https://app.cobregratis.com.br'
attribute :id, Integer
attribute :name, String
attribute :amount, Float
attribute :expire_at, Date
attribute :external_link, String
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

~/Code/rubygems /master > gem list gemcutter
*** LOCAL GEMS ***
gemcutter (0.6.1, 0.5.0)
~/Code/rubygems /master > irb -rubygems
ruby-1.8.7-p299 > Gem.find_files "rubygems_plugin"
=> ["/Users/wycats/.rvm/gems/ruby-1.8.7-p299/gems/gem-open-0.1.2/lib/rubygems_plugin.rb", "/Users/wycats/.rvm/gems/ruby-1.8.7-p299/gems/gemcutter-0.5.0/lib/rubygems_plugin.rb", "/Users/wycats/.rvm/gems/ruby-1.8.7-p299/gems/gemcutter-0.6.1/lib/rubygems_plugin.rb"]
ruby-1.8.7-p299 > Gem.loaded_specs.map {|k,v| v.full_name }
=> ["gem-open-0.1.2", "gemcutter-0.5.0", "json_pure-1.4.6"]