Skip to content

Instantly share code, notes, and snippets.

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

Matias Seguel seguelador

🏠
Working from home
  • Mercado Libre
  • Chile
View GitHub Profile
@seguelador
seguelador / additional-methods.js
Created May 2, 2017 15:25
Method for letters only with accents on Jquery Validation
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z\s-a-záéíóúý]+$/i.test( value );
}, "Solo letras por favor" );
@seguelador
seguelador / fog.rb
Last active April 18, 2017 18:08 — forked from gsanchezd/fog.rb
Base Fog Carrierwave config
if Rails.env.test?
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
end
else
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => ENV['aws_access_key_id'], # required
@seguelador
seguelador / zsh.md
Created April 12, 2017 02:53 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
devise.rb
config.omniauth :google_oauth2, Rails.application.secrets.google_oauth2_key, Rails.application.secrets.google_oauth2_secret,
scope: 'email, profile', image_aspect_ratio: 'square', image_size: 300, access_type: 'online'
user.rb
def self.find_for_oauth(auth, signed_in_resource = nil)
identity = Identity.find_for_oauth(auth)
user = signed_in_resource ? signed_in_resource : identity.user