Skip to content

Instantly share code, notes, and snippets.

View mmottola24's full-sized avatar

Michael Mottola mmottola24

View GitHub Profile
@mmottola24
mmottola24 / sendmail_settings.rb
Created August 30, 2012 19:52
Using sendmail in Rails Mailer may send duplicate emails to recipient. Default sendmail settings may cause this. Fix it by adding this to /config/environments/production.rb to stop that behaviour.
config.action_mailer.sendmail_settings = {
:arguments => '-i'
}
@mmottola24
mmottola24 / quiet_assets_initializer
Created July 5, 2012 01:28
Quiet Assets in Logger for Rails 3.2
Rails::Rack::Logger.class_eval do
def call_with_quiet_assets(env)
previous_level = Rails.logger.level
Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0
call_without_quiet_assets(env).tap do
Rails.logger.level = previous_level
end
end
alias_method_chain :call, :quiet_assets
end
@mmottola24
mmottola24 / Linear Gradient
Created March 22, 2011 15:55
Linear Gradients
-moz-linear-gradient(center top , #6DC3E6, #0C5FA3) repeat scroll 0 0 transparent