Skip to content

Instantly share code, notes, and snippets.

Como Instalar e Usar o Docker no Ubuntu 18.04 PostedNovember 16, 2018 113.3k views DockerUbuntu 18.04

By Brian Hogan

Become an author

Uma versão anterior deste tutorial foi escrita por finid.

Introdução

@airtonGit
airtonGit / Developers Developers Developers!.md
Created May 11, 2020 20:41
Seleção de frases e citações

"Weeks of programming can save you hours of planning." - A Harckernews pt-BR "Semanas de programação podem te economizar horas de planejamento" - Hackernews

@airtonGit
airtonGit / MySQL optimizações
Last active May 11, 2020 20:30
Exemplos de optimizar mysql database
How to Optimize MySQL Queries for Speed and Performance
original url: https://dzone.com/articles/how-to-optimize-mysql-queries-for-speed-and-perfor
In this guide, we will take you through the steps of optimizing SQL queries and databases on your Alibaba Cloud Elastic Compute Service (ECS) instance. This will guarantee stability, scalability, reliability and speed of applications and websites running on your Alibaba Cloud instance.
Prerequisites
A valid Alibaba cloud account. If you don't have one already, you can sign up for an Alibaba Cloud and enjoy $300 worth in Free Trial.
A server running your favorite operating system that can support MySQL (e.g. Ubuntu, Centos, Debian).
MySQL database server.
@airtonGit
airtonGit / K8s Arquiteturas
Last active May 11, 2020 12:14
Retirado do site k8s exemplifica arquiteturas de Pods
Monday, June 29, 2015
The Distributed System ToolKit: Patterns for Composite Containers
Having had the privilege of presenting some ideas from Kubernetes at DockerCon 2015, I thought I would make a blog post to share some of these ideas for those of you who couldn’t be there.
Over the past two years containers have become an increasingly popular way to package and deploy code. Container images solve many real-world problems with existing packaging and deployment tools, but in addition to these significant benefits, containers offer us an opportunity to fundamentally re-think the way we build distributed applications. Just as service oriented architectures (SOA) encouraged the decomposition of applications into modular, focused services, containers should encourage the further decomposition of these services into closely cooperating modular containers. By virtue of establishing a boundary, containers enable users to build their services using modular, reusable components, and this in turn leads to services
git credential-manager uninstall
git credential-manager install
You can configure an individual repo to use a specific user / email address
which overrides the global configuration. From the root of the repo, run
git config user.name "Your Name Here"
git config user.email [email protected]
@airtonGit
airtonGit / mysql otimizações.md
Last active May 7, 2020 14:31
MySQL principais paramêtros de otimizações

Tuning MySQLPermalink

When altering the MySQL configuration, be alert to the changes and how they affect your database. Even when following the instructions of programs such as MySQLTuner, it is best to have some understanding of the process.

The MySQL configuration file stored in the following location: /etc/mysql/my.cnf.

Note

Prior to updating your MySQL configuration, create a backup of the my.cnf file:

cp /etc/mysql/my.cnf ~/my.cnf.backup

@airtonGit
airtonGit / mysql-otimizar-banco.sh
Created May 7, 2020 14:01
MySQL otimizar todas as tabelas do banco de dados, melhora muito consultas com joins rodando em containers
#!/bin/bash
docker exec running-container-id sh -c 'exec mysqlcheck -uroot -p"$MYSQL_ROOT_PASSWORD" nome-banco'
@airtonGit
airtonGit / requestJson.go
Created May 28, 2019 00:36
Simple GO json request
package main
import (
"fmt"
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"time"
@airtonGit
airtonGit / reverse-proxy-concept.go
Last active May 15, 2019 13:48
Conceito basico de proxy reverso fornecido pela http lbrary na linguagem Go
func serveReverseProxy(target string, res http.ResponseWriter, req *http.Request) {
//parse the url
url, err := url.Parse(target)
if err != nil {
panic(err.Error())
}
//create de reverse proxy
proxy := httputil.NewSingleHostReverseProxy(url)
//Update the headers to allow for SSL redirection
@airtonGit
airtonGit / insertFromSelect.sql
Created May 15, 2019 13:37
SQL inserir em tabela usando select em outra como origem das linhas
INSERT INTO tabelaDestino
SELECT null, campo1, campo2, CURRENT_TIMESTAMP, alias1.campoA
FROM tabelaOrigem
INNER JOIN tabelaRelacionada1 alias1 ON alias1.id = alias2.fk_id
WHERE
alias1.active = true
;