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
# config/initializers/paperclip.rb | |
Paperclip::Attachment.default_options[:s3_host_name] = 's3.eu-central-1.amazonaws.com' |
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
secrets = Rails.application.secrets | |
config.paperclip_defaults = { | |
storage: :s3, | |
s3_credentials: { | |
bucket: secrets.amazon_bucket_name, | |
access_key_id: secrets.amazon_access_key_id, | |
secret_access_key: secrets.amazon_secret_access_key, | |
s3_region: "eu-central-1" | |
} | |
} |
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
class ApplicationController < ActionController::Base | |
def after_sign_in_path_for(resource) | |
request.env['omniauth.origin'] || stored_location_for(resource) || root_path | |
end | |
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
E, [2013-11-24T08:23:48.282063 #20438] ERROR -- : reaped #<Process::Status: pid 29427 exit 1> worker=1 | |
I, [2013-11-24T08:23:48.282426 #20438] INFO -- : worker=1 spawning... | |
I, [2013-11-24T08:23:48.283720 #29440] INFO -- : worker=1 spawned pid=29440 | |
I, [2013-11-24T08:23:48.301879 #29440] INFO -- : Refreshing Gem list | |
E, [2013-11-24T08:23:48.343457 #29430] ERROR -- : couldn't find HOME environment -- expanding `~' (ArgumentError) | |
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:23:in `expand_path' | |
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:23:in `<module:Guard>' | |
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:8:in `<top (required)>' | |
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' | |
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' |
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
# Configs | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config secondsBetweenRepeat 0.1 | |
config checkDefaultsOnLoad true | |
config focusCheckWidthMax 3000 | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
#config windowHintsDuration 5 |
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
# RegEx: is from http://stackoverflow.com/a/13311941/632478 | |
# Rubular: http://rubular.com/r/cdkLxAkTbk | |
validates :url, format: { with: /^(http|https):\/\/|[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}(:[0-9]{1,5})?(\/.*)?$/ix } |
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
# Le query ora dialogano non più su utc ma sono impostato sulla time zone Italiana. | |
module Registration | |
class Application < Rails::Application | |
config.time_zone = 'Rome' | |
config.active_record.default_timezone = :local |
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
$.ajax 'http://localhost:3000/risorsa/index', | |
type: 'GET', | |
data: "uniquekey=#{codice_commessa}", | |
dataType: 'json', | |
processData: true, | |
success: (data)-> | |
customer = data.customer | |
for key, value of data.productInstance | |
if value.productName == "SCHEDA_AZIENDA_GIALLO" | |
productReferenceUrl = value.productReference.replace("ITA|","") |
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
# launch event | |
$('body').trigger 'event_custom' | |
# capture the event | |
$('body').bind 'event_custom', -> | |
alert "event fired!" |
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
.replace { | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
} |