Skip to content

Instantly share code, notes, and snippets.

View taniadaniela's full-sized avatar

tania daniela paiva taniadaniela

View GitHub Profile
module.exports = {
up: function (queryInterface, Sequelize) {
return [
queryInterface.addColumn('User', 'name', {
type: Sequelize.STRING
}),
queryInterface.addColumn('User', 'nickname', {
type: Sequelize.STRING,
})
];
@nkpoid
nkpoid / docker-compose.yml
Created October 4, 2015 02:05
docker-compose.yml
gitlab-redis:
image: sameersbn/redis:latest
volumes:
- /home/user/gitlab/redis:/var/lib/redis
gitlab-mysql:
image: sameersbn/mysql:latest
volumes:
- /home/user/gitlab/mysql:/var/lib/mysql
environment:
- DB_NAME=gitlabhq_production
@jeffrafter
jeffrafter / sidekiq_inspect.rb
Created August 14, 2014 00:16
Want to inspect your Sidekiq queues?
def fetch_contents(queue = "default", max = 100000)
Sidekiq.redis do |r|
r.lrange("queue:#{queue}", 0, max)
end;
end
def sidekiq_job_breakdown(queue = "default", contents = nil)
re = /\"class":"([0-9A-Za-z_::]+)"/
contents ||= fetch_contents(queue)
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@pbyrne
pbyrne / ruby-1.9.3.markdown
Last active March 16, 2020 22:39
Comparison of our core Rails app using Webrick, Puma, and Unicorn. Almost no effort was made to optimize either application server. Tests were performed on a MacBook Air using `siege` to hit the application homepage.

TL;DR

Unicorn was by far the best performing (5.94 trans/sec over the 1-minute test, 352 total). Puma (3.95 trans/sec, 235 total) appeared to perform no better than Webrick, despite the default behavior of using up to 16 threads. Perhaps increasing its worker count to the number of cores will improve its performance.

I've tried to run multiple Puma workers with the workers directive (per their sample documentaiton), but I receive errors about undefined method 'workers' for #<Puma::Configuration::DSL:0x007ffca4bde798>).

Webrick

Server

$ bundle exec rails server

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream