Skip to content

Instantly share code, notes, and snippets.

View afonsoaugusto's full-sized avatar
👾
SRE & DevOps

Afonso Rodrigues afonsoaugusto

👾
SRE & DevOps
View GitHub Profile
@edsoncelio
edsoncelio / terraform-commands.md
Last active January 30, 2023 10:26
Terraform Associate Certification Commands Tips

Terraform Associate Certification Tips

Concepts

<block type> "<resource type>" "<local name/label>"
@coryodaniel
coryodaniel / list.txt
Created May 13, 2020 22:04
GCP List of API Services
NAME TITLE
abusiveexperiencereport.googleapis.com Abusive Experience Report API
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API
accessapproval.googleapis.com Access Approval API
accesscontextmanager.googleapis.com Access Context Manager API
actions.googleapis.com Actions API
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API
adexchangebuyer.googleapis.com Ad Exchange Buyer API II
adexchangeseller.googleapis.com Ad Exchange Seller API
adexperiencereport.googleapis.com Ad Experience Report API
@afonsoaugusto
afonsoaugusto / 01_execute_mongodb_with_database_files.sh
Last active August 26, 2020 13:00
Up mongodb with docker and files from backup.
tar -xvf archive.tar.gz
#Subir o banco no docker com bacup do Atlas:
docker run --rm -it -v $PWD:/data/db -p 27017:27017 mongo:3.6
docker run --rm -it -v $PWD:/data/db --memory="5g" --memory-swap="2g" --cpus="2.0" -p 27017:27017 mongo:3.6
import urllib3
import RPi.GPIO as gpio
import Adafruit_DHT as dht
import time as t
gpio.setmode(gpio.BOARD)
gpio.setup(32, gpio.OUT)
chave = 'TTN9Y84915G60MJY'
@wagnerbianchijr
wagnerbianchijr / MAXSCALE_SETUP_RWSPLIT_MARIADBMON
Last active September 13, 2018 16:11
MaxScale 2.2.X setup (MariaDBMon+ReadWriteSplit Router)
#: This gist is supposed to be used when someone else intends to have a simple Maxscale 2.2.X++ setup
#: considering a replication cluster. By replication cluster I mean one master and X slaves; in the
#: case of this gist, I'm using just one slave, but, you can add as many as you want to add more to the
#: below gist. You will notice that Maxscale after setup will be configured using dynamic commands and
#: that is the place you will adjust your servers to be created an added to the service+monitor that
#: will be created. The service has a listener, here, allocated the mysql/3306 port.
###################### SETUP MARIADB OFFICIAL REPO AND MAXSCALE PACKAGES ######################
#: executing the command for the repository setup on servers
  • Qual é o problema com a arquitetura das aplicações atuais?
  • Um projeto, na maioria das vezes, é começado pequeno, por uma pessoa e sem saber como será a sua evolução.
  • Pode acontecer de novas pessoas entrarem no projeto e não conhecerem as regras que guiam a aplicação.
  • Um dos princípios de organização é o MVC ou Model View Controller.
  • No MVC a regra de negócio fica na Model, os templates na View e a mediação é feita pelo Controller.
  • O MVC não é suficiente para manter uma aplicação com código compreensível durante muito tempo.
  • A ideia de utilizar MVC veio de frameworks e a maioria das aplicações estão acopladas de alguma maneira a frameworks.
  • Um projeto é iniciado normalmente (1) escolhendo um framework, (2) instalando um esqueleto, (3) removendo códigos de demonstração, (
@herpiko
herpiko / kubedingdong.md
Last active March 7, 2023 19:10
Kubernetes notes for CKA exam preparation 💪

This notes applied to Kubernetes version 1.9.1-00 on Ubuntu Xenial.

Basic concept

TO BE WRITTEN

Installation and starting up 🏁

Installation

  • Swap should be disabled (see /etc/fstab)
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active January 15, 2024 20:44
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;