Skip to content

Instantly share code, notes, and snippets.

🌱
Planting the future!

Jean Brito jeanfbrito

View GitHub Profile
@jeanfbrito
jeanfbrito / postgres-outage.md
Created Oct 2, 2018 — forked from andywer/postgres-outage.md
Post Mortem: Postgres outage on 2018-08-20
View postgres-outage.md

2018-08-20: Postgres failure

What happened

The PostgreSQL container stopped unexpectedly, was automatically restarted, but suddenly didn't accept any connections anymore. Neither from the API service containers nor from the Macbook over the internet.

Error in logs:

FATAL:  pg_hba.conf rejects connection for host "10.0.1.2", user "postgres", database "******", SSL off
@jeanfbrito
jeanfbrito / reverse.md
Last active Aug 28, 2018
Add SSH Reverse Tunnel
View reverse.md

Configuring a SSH Reverse Tunnel sevice

First, let`s assume that:

The server IP is 1.1.1.1.

The user on the server is relayserver_user.

The user on the client is homeserver_user.

@jeanfbrito
jeanfbrito / gist:692b34a2b41850d94147a5a606109c47
Created Jul 6, 2018 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:692b34a2b41850d94147a5a606109c47

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@jeanfbrito
jeanfbrito / cidades-brasil.json
Created Apr 8, 2018 — forked from fernandosavio/cidades-brasil.json
JSON com as cidades brasileira segundo o IBGE.
View cidades-brasil.json
{
"Acre": ["Acrel\u00e2ndia","Assis Brasil","Brasil\u00e9ia","Bujari","Capixaba","Cruzeiro do Sul","Epitaciol\u00e2ndia","Feij\u00f3","Jord\u00e3o","M\u00e2ncio Lima","Manoel Urbano","Marechal Thaumaturgo","Pl\u00e1cido de Castro","Porto Acre","Porto Walter","Rio Branco","Rodrigues Alves","Santa Rosa do Purus","Sena Madureira","Senador Guiomard","Tarauac\u00e1","Xapuri"],
"Alagoas": ["\u00c1gua Branca","Anadia","Arapiraca","Atalaia","Barra de Santo Ant\u00f4nio","Barra de S\u00e3o Miguel","Batalha","Bel\u00e9m","Belo Monte","Boca da Mata","Branquinha","Cacimbinhas","Cajueiro","Campestre","Campo Alegre","Campo Grande","Canapi","Capela","Carneiros","Ch\u00e3 Preta","Coit\u00e9 do N\u00f3ia","Col\u00f4nia Leopoldina","Coqueiro Seco","Coruripe","Cra\u00edbas","Delmiro Gouveia","Dois Riachos","Estrela de Alagoas","Feira Grande","Feliz Deserto","Flexeiras","Girau do Ponciano","Ibateguara","Igaci","Igreja Nova","Inhapi","Jacar\u00e9 dos Homens","Jacu\u00edpe","Japaratinga","Jaramataia","Jequi\u00e1 da Praia","Jo
@jeanfbrito
jeanfbrito / input-group-in-simple-form.md
Created Mar 7, 2018 — forked from chunlea/input-group-in-simple-form.md
How to use Boostrap 3 input-group in Simple Form
View input-group-in-simple-form.md
@jeanfbrito
jeanfbrito / vsCodeOpenFolder.reg
Created Feb 20, 2018
Right click on Windows folder and open with Visual Studio Code
View vsCodeOpenFolder.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = 'jadesystems/rails-5-1'
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 4
end
# Create a forwarded port mapping which allows access to a specific port
@jeanfbrito
jeanfbrito / vm-resize-hard-disk.md
Created Feb 5, 2018 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.
View vm-resize-hard-disk.md

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@jeanfbrito
jeanfbrito / dokku_on_digital_ocean.md
Last active Jul 6, 2017 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.
View dokku_on_digital_ocean.md

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku
View install phantomjs 2.1.1 - ubuntu
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.