sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
portainer: | |
image: portainer/portainer-ce:latest | |
container_name: portainer | |
restart: always | |
ports: | |
- "9000:9000" # Porta de acesso ao Portainer | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock # Permite o gerenciamento do Docker local | |
- portainer_data:/data # Volume persistente para os dados do Portainer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adicione a chave GPG e o repositório | |
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null | |
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list' | |
# Atualize os pacotes e instale o GitHub Desktop | |
sudo apt update && sudo apt install github-desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String adicionarMascaraCnpfCpf(String valor) { | |
if (valor.length() == 14) { | |
Pattern pattern = Pattern.compile("(\\d{2})(\\d{3})(\\d{3})(\\d{4})(\\d{2})"); | |
Matcher matcher = pattern.matcher(valor); | |
if (matcher.find()) { | |
return matcher.replaceAll("$1.$2.$3/$4-$5"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STS: https://github.com/spring-projects/sts4/wiki/Previous-Versions | |
GITHUB: https://desktop.github.com/ | |
JAVA: https://jdk.java.net/java-se-ri/11 | |
Lombook: https://projectlombok.org/download | |
Maven (Maven 3.6.2): https://maven.apache.org/download.cgi | |
Docker: https://docs.docker.com/desktop/windows/install/ | |
---------------------------------------------------------- | |
EclEmma Java Code Coverage | |
Ferramenta de cobertura de código. | |
DBeaver Ferramenta para conexão com banco de dados e edição de comandos SQL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE pessoa ( | |
id serial NOT NULL, | |
nome text, | |
interesses jsonb, | |
informacoes_adicionais jsonb | |
); | |
INSERT INTO pessoa VALUES (1, 'João', '["futebol", "natação"]', '{"idade": 28, "time": "Chapecoense"}'); | |
INSERT INTO pessoa VALUES (2, 'Maria', '["leitura", "programação", "dança"]', '{"idade": 39, "trabalha-com-programacao": true, "area": "back-end"}'); | |
INSERT INTO pessoa VALUES (3, 'Ana', '["programação"]', '{"idade": 29, "trabalha-com-programacao": false, "area": "front-end", "areas-de-interesse": ["mobile", "design"]}'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
double investimento = 5000.00; | |
double juros = 0.01; | |
double valorFinal = investimento * Math.pow(1 + juros, 12); | |
System.out.println(valorFinal); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Atalhos do IntelliJ | |
---------------------------------------------------------------------------------- | |
templates: | |
---------------------------------------------------------------------------------- | |
psvm - primeira letra - public static void main | |
sout - System.out.println | |
CONTROL + J - live template (usar "Save as live template" para criar novos) | |
---------------------------------------------------------------------------------- | |
atalhos: | |
---------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Instant; | |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.time.LocalTime; | |
import java.time.Month; | |
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.util.ArrayList; | |
import java.util.List; |
NewerOlder