Skip to content

Instantly share code, notes, and snippets.

View marcopaganini's full-sized avatar
💭
"Now" is the envy of all the dead.

Marco Paganini marcopaganini

💭
"Now" is the envy of all the dead.
View GitHub Profile
# Useful configuration for your ~/.inputrc.
# Just drop this file into your home directory.
# Author: [email protected] (http://github.com/marcopaganini)
# vi mode FTW. Use <ESC> to enter.
set editing-mode vi
# Show mode in prompt when in command mode.
set show-mode-in-prompt on
set vi-ins-mode-string ""
@marcopaganini
marcopaganini / gitreset.md
Created September 13, 2020 02:24
Git reset and squash only upstreams

Nota: explicação longa a frente...

O problema não é usar o mesmo branch. O problema é que você não está resetando o branch antes (pra ficar igual ao upstream/master) antes de começar um novo desafio.

Vamos a um exemplo prático: imagine que você faça o clone do osprogramadores/op-desafios (upstream), e que existam apenas dois commits lá:

002 Desafio de outro alguém
001 Desafio de alguém

Keybase proof

I hereby claim:

  • I am marcopaganini on github.
  • I am paganini (https://keybase.io/paganini) on keybase.
  • I have a public key whose fingerprint is 437E 0C7E E028 A481 FE4E 2210 AA32 3DF2 B40C D0A9

To claim this, I am signing this object:

/*
* Example DriverPg C++
* @package main
* @author @jeffotoni
* @size 10/09/2018
*/
#include <iostream>
// ex: c++
/*
* Example DriverPg Go
* @package main
* @author @jeffotoni
* @size 10/09/2018
*/
package main
import (
@marcopaganini
marcopaganini / nginx_reverse_proxy_with_ssl_cert_authentication.md
Last active December 8, 2023 19:38
NGINX reverse proxy with SSL cert authentication

NGINX reverse proxy with SSL cert authentication

This is a short guide for those who want to set up a NGINX reverse proxy with SSL cert authentication. The basic idea is to create a private CA and emit certificates signed by it. Only browsers and/or devices with the certs signed by this CA will be granted access to resources behind the proxy.

There are a few examples of similar configurations on the web, but most use openssl directly. This gist uses Easy-RSA to simplify the task of creating and maintaining a private CA and certs to be distributed to clients.

Install and configure Easy-RSA

Clone Easy-RSA 3: