Skip to content

Instantly share code, notes, and snippets.

🌐
Terraform again

Afonso Rodrigues afonsoaugusto

🌐
Terraform again
Block or report user

Report or block afonsoaugusto

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 TesteThingSpeak.py
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 Sep 13, 2018
MaxScale 2.2.X setup (MariaDBMon+ReadWriteSplit Router)
View MAXSCALE_SETUP_RWSPLIT_MARIADBMON
#: 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
View hexagonal-architecture.md

Hexagonal Architecture - Message-Oriented Software Design por Matthias Noback

  • 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, (
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active Oct 1, 2019
Como fazer alguém te responder no whatsapp
View comoSerChatoNoWhatsapp.js
/*
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;
@shashank-ssriva
shashank-ssriva / Output HTML File
Last active Apr 29, 2019
Another version of my Shell Script that generates a server(Linux) Health Report in a vivid & vibrant HTML format, complete with 3D colorful charts & visual elements. Run this as sudo. For more details & screenshots, go to my blog post https://watilearnd2day.wordpress.com/2017/05/14/bash-shell-script-to-create-a-rich-colorful-server-health-report…
View Output HTML File
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>
<html>
<head>
<link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css integrity=sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u crossorigin=anonymous>
<link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css integrity=sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp crossorigin=anonymous>
<script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js integrity=sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa crossorigin=anonymous></script>
<script type=text/javascript src=https://www.gstatic.com/charts/loader.js></script>
<script type=text/javascript>
google.charts.load('current', {'packages':['gauge']});
google.charts.setOnLoadCallback(drawChart);
@alopes
alopes / stopwords.txt
Created Apr 10, 2013
Portuguese stop words
View stopwords.txt
de
a
o
que
e
do
da
em
um
para
@tkaemming
tkaemming / example.py
Created Mar 8, 2012
python logging timer decorator
View example.py
import logging, time
from timer import timed
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
@CristinaSolana
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
You can’t perform that action at this time.