Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Simplicity is the ultimate sophistication

Leonel Gasparrini jlgasparrini

👨‍💻
Simplicity is the ultimate sophistication
Block or report user

Report or block jlgasparrini

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View License key PhpStorm 8
License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====
@jlgasparrini
jlgasparrini / composer.sh
Created Jan 21, 2017
How to install composer
View composer.sh
brew install composer #Mac
sudo apt-get install composer #Ubuntu
@jlgasparrini
jlgasparrini / 0_reuse_code.js
Created Mar 1, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Jan 20, 2015
Carrierwave settings to conect with AWS S3 API
View carrierwave.rb
# 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 Jan 20, 2015
AWS variables for deploy to heroku with fog gem
View application.yml
# 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 Aug 29, 2015
Redis configuration for deploy to heroku server
View redis.rb
# 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
View unicorn.rb
# 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
View application.css.scss
/*
*= require_self
*= require_tree .
*/
/*
*= require jquery.ui.core
*= require jquery.ui.theme
You can’t perform that action at this time.