Skip to content

Instantly share code, notes, and snippets.

View estevaoam's full-sized avatar
🤖

Estevão Mascarenhas estevaoam

🤖
View GitHub Profile
@pond
pond / gist:5eaec0c30c0b4477f234
Last active August 29, 2015 14:05
PostgreSQL "active?" Rails adapter check async patch
# This monkey patches the PostgreSQL adapter to use asynchronous
# communication when doing its "SELECT 1" check for is-connection-active.
# One symptom of this problem is stalled processing queues in Sidekiq.
# See also:
#
# https://github.com/rails/rails/issues/12867
#
# At the time of writing we have seen indefinite blocking down in the C
# library's "poll()" method due to the out-of-box Rails code using blocking
# I/O, in multithreaded environments - one thread gets stuck in the I/O and
@paulodeleo
paulodeleo / Minhas anotações sobre a palestra "Workflow remoto, passo a passo da equipe de alta performance" com Fábio Akita
Created August 20, 2014 02:34
Minhas anotações sobre a palestra "Workflow remoto, passo a passo da equipe de alta performance" com Fábio Akita
http://www.conadev.com/fa190814.php
Assitido em 19/08/2014
Destaques sobre o relato de como as coisas funcionam na Codeminer:
- O principal mérito dado ao uso de escritório físico é juntar juniors e seniors em um mesmo ambiente;
- Usam slack para comunicação unificada;
- Escritórios e equipes não tem gerentes;
@marcocarvalho
marcocarvalho / seeds.rb
Last active December 23, 2015 02:49 — forked from dcrec1/seeds.rb
states = <<STATES
AC,Acre
AL,Alagoas
AP,Amapá
AM,Amazonas
BA,Bahia
CE,Ceará
ES,Espírito Santo
GO,Goiás
MA,Maranhão
@rafaelrinaldi
rafaelrinaldi / README.md
Last active July 28, 2016 18:53
Simple script to display usage information about your project

Simple script to display usage information about your project

Usage

Implement a help field on your project's package.json listing all the scripts you want to display information about. Just make sure to use the same keys.

$ npm run help -s

> project-sample@1.0.0 help /Users/gordon-freeman/dev/project-sample
@johnantoni
johnantoni / unicorn.rb
Created August 2, 2012 15:48
unicorn + nginx setup + ssl
unicorn.rb
-----------------------------------
application = "jarvis"
remote_user = "vagrant"
env = ENV["RAILS_ENV"] || "development"
RAILS_ROOT = File.join("/home", remote_user, application)
worker_processes 8
timeout 30
@linjian
linjian / deferred_garbage_collection_all_in_one.rb
Created July 19, 2012 08:09
Deferred Garbage Collection All in One
# http://ariejan.net/2011/09/24/rspec-speed-up-by-tweaking-ruby-garbage-collection
#
# Usage:
# DEFER_GC=10 rspec spec/
# DEFER_GC=10 cucumber features/
#
# put it to spec/support/deferred_garbage_collection_all_in_one.rb
# or feature/support/hooks.rb
class DeferredGarbageCollection
DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || -1).to_f
@nazgob
nazgob / ctags.setup
Created January 6, 2012 13:44
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@lxneng
lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@ryderdamen
ryderdamen / gce-to-gcs-uploads.md
Created December 4, 2018 15:43
Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.

Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine. You can use the gsutil command line tool that comes installed on all GCE instances.

If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.

@erikhenrique
erikhenrique / bin-cc.md
Last active February 5, 2024 16:06
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3