Skip to content

Instantly share code, notes, and snippets.

View jlgasparrini's full-sized avatar
💎

Leonel Gasparrini jlgasparrini

💎
View GitHub Profile
License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====
@jlgasparrini
jlgasparrini / pre-commit
Created February 25, 2020 07:09 — forked from tinogomes/pre-commit-complete
Git Hook pre-commit to pass Rubocop and Brakeman on Rails application for validations
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
if git rev-parse --verify HEAD >/dev/null 2>&1
@jlgasparrini
jlgasparrini / composer.sh
Created January 21, 2017 18:38
How to install composer
brew install composer #Mac
sudo apt-get install composer #Ubuntu
@jlgasparrini
jlgasparrini / 0_reuse_code.js
Created March 1, 2016 12:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jlgasparrini
jlgasparrini / carrierwave.rb
Created January 20, 2015 16:22
Carrierwave settings to conect with AWS S3 API
# config/initializers/carrierwave.rb
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV["AWS_ACCESS_KEY"],
:aws_secret_access_key => ENV["AWS_SECRET_KEY"],
:region => ENV["S3_REGION"]
}
config.fog_directory = ENV["AWS_BUCKET"]
end
@jlgasparrini
jlgasparrini / application.yml
Created January 20, 2015 16:19
AWS variables for deploy to heroku with fog gem
# config/application.yml
AWS_ACCESS_KEY: "paste-aws-access-key-here"
AWS_SECRET_KEY: "paste-aws-secret-key-here"
AWS_BUCKET: "enter-your-bucket-name-here"
S3_REGION: "enter-your-region-here"
@jlgasparrini
jlgasparrini / redis.rb
Last active August 29, 2015 14:13
Redis configuration for deploy to heroku server
# config/initializers/redis.rb
if ENV["REDISCLOUD_URL"]
uri = URI.parse(ENV["REDISCLOUD_URL"])
$redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
else
$redis = Redis.new(:host => 'localhost', :port => 6379)
end
@jlgasparrini
jlgasparrini / unicorn.rb
Created January 20, 2015 13:56
Unicorn settings
# config/unicorn.rb
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 15
preload_app true
before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
Process.kill 'QUIT', Process.pid
end
/*
*= require_self
*= require_tree .
*/
/*
*= require jquery.ui.core
*= require jquery.ui.theme