Skip to content

Instantly share code, notes, and snippets.

View fabianoalmeida's full-sized avatar
🎯
Focusing

Fabiano Almeida fabianoalmeida

🎯
Focusing
  • São Paulo, Brazil
View GitHub Profile
@fabianoalmeida
fabianoalmeida / cert-manager-nginx-ingress-gke-recipe.md
Last active February 18, 2020 18:54
A quickstart guide to deploying cert-manager and nginx-ingress on GKE

This is a quick recipe for deploying cert-manager and nginx-ingress on GKE to obtain SSL certificates from Lets Encrypt. Whilst this recipe is designed for Google Cloud Platform, it can easily be adapted for other cloud platforms.

We'll begin with a Kubernetes cluster, and we'll obtain authentication credentials.

Step 0 - Get Credentials and Install Helm Client

$ gcloud container clusters get-credentials my-test-app
@fabianoalmeida
fabianoalmeida / install ubuntu 10.10
Created July 30, 2011 21:58 — forked from vinioliveira/install ubuntu 10.10
Configuring the instalation of nginx+rvm+passenger on Ubuntu 10.10
#Add new user to deploy your application on Ubuntu 10.10
useradd -s /bin/bash -m app-user # add user
passwd app-user # change password
#in /usr/sbin/visudo Add line below just below 'root ALL=(ALL) ALL':
app-user ALL=(ALL) ALL
#change to user early created
su app-user
@fabianoalmeida
fabianoalmeida / cpf_cnpj_validators.rb
Created July 11, 2011 18:02 — forked from gouvermxt/cpf_cnpj_validators.rb
validação de CPF e CNPJ em Ruby
#------------------------------------------------------------------------------
# Rotinas para verificação de CPF e CNPJ
# Linguagem: Ruby
# Escrito por: André Camargo < andre@boaideia.inf.br > http://blog.boaideia.inf.br
# Use, copie, melhore a vontade! Patches são bem-vindos...
#------------------------------------------------------------------------------
def check_cpf(cpf=nil)
return false if cpf.nil?
nulos = %w{12345678909 11111111111 22222222222 33333333333 44444444444 55555555555 66666666666 77777777777 88888888888 99999999999 00000000000}