Skip to content

Instantly share code, notes, and snippets.

Giovani Generali giovanigenerali

Block or report user

Report or block giovanigenerali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View countries.json
"BD": "Bangladesh",
"BE": "Belgium",
"BF": "Burkina Faso",
"BG": "Bulgaria",
"BA": "Bosnia and Herzegovina",
"BB": "Barbados",
"WF": "Wallis and Futuna",
"BL": "Saint Barthelemy",
"BM": "Bermuda",
View yup.js
const validationSchema = Yup.object({
email: Yup
.email('Informe um e-mail válido')
.required('Informe seu e-mail'),
password: Yup
.min(6, 'A senha deve conter no mínimo 6 caracteres')
.required('Informe sua senha'),
View paises.json
"paises": [
"codigo": "93",
"pais": "Afeganistão",
"sigla": "AF"
"codigo": "27",
"pais": "África do Sul",
giovanigenerali / paises-gentilico.json
Last active Jan 8, 2019
Lista de paises em json
View paises-gentilico.json
"gentilico": "afegãne",
"nome_pais": "Afeganistão",
"nome_pais_int": "Afghanistan",
"sigla": "AF"
"gentilico": "sul-africana",
"nome_pais": "África do Sul",
giovanigenerali / memory_monitor.config
Created Dec 9, 2018
aws elastic beanstalk - memory monitor
View memory_monitor.config
# .ebextensions/memory_monitor.config
command: "sudo yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https perl-Digest-SHA.x86_64"
ignoreErrors: false
command: "curl -O"
ignoreErrors: true
View getParamsFromURL.js
const getParamsFromURL = (url) => {
return decodeURIComponent(new URL(url).search.substr(1))
.reduce((acc, cur) => {
const [key, value] = cur.split('=')
acc[key] = value
return acc
}, {})
const params = getParamsFromURL('https://localhost/resource/?param1=value1&param2=value2');
View environment
eb ssh [machine]
sudo vi /etc/environment
add line:
giovanigenerali /
Last active Aug 25, 2019
AWS EB Deploy Script
DATE=$(date '+[%Y-%m-%d %H:%M:%S]')
LABEL=$(git log --pretty=format:"%h" -1)
MESSAGE=$(git log --pretty=format:"%s" -1)
echo "$DATE - $LABEL"
eb deploy $MACHINE -l "$DATE - $LABEL" -m "$MESSAGE"
giovanigenerali /
Last active Apr 7, 2020
Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

1 - Create a file to store our credentials:

sudo vim /etc/postfix/sasl_passwd

2 - Add something like this:

You can’t perform that action at this time.