Skip to content

Instantly share code, notes, and snippets.

@adamatti
adamatti / BubbleSortTest.py
Last active November 1, 2019 16:52
Resultado do dojo de python - 04/05/2017 #dojo
import unittest
from sort import BubbleSort
class BubbleSortTest(unittest.TestCase):
def setUp(self):
self.bubble_sort = BubbleSort()
def testSortEmptyList(self):
lista = []
@adamatti
adamatti / .editorconfig
Last active November 1, 2019 19:10
Default files - Java #bootstrap
root = true
[*.{groovy,gradle}]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
[Makefile]
@adamatti
adamatti / remove-docker-containers.md
Last active November 1, 2019 16:51 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images #docker
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
@adamatti
adamatti / README.md
Last active November 1, 2019 16:51
Docker commands #docker
  • stop all containers: docker stop $(docker ps -q)
  • delete all containers: docker rm $(docker ps -aq)
  • delete all images: docker rmi $(docker images -q)
const express = require('express');
const app = express();
app.get('/health', function (req, res) {
res.send('Hello World!');
});
app.get('/jokenpo', function (req, res) {
let jogadaJogador1 = req.query.jogador1;
let jogadaJogador2 = req.query.jogador2;
@adamatti
adamatti / README.adoc
Last active October 30, 2020 01:36
Play with Quarkus #quarkus
  • Create project:

mvn io.quarkus:quarkus-maven-plugin:1.9.1.Final:create \
    -DprojectGroupId=adamatti \
    -DprojectArtifactId=sample \
    -DclassName="adamatti.HelloResource" \
    -Dpath="/hello"
@adamatti
adamatti / README.adoc
Last active November 1, 2019 16:48
Sending a message to AWS / local #sample #aws

Required

How to run:

  • Start AWS local: docker run -p 4576:4576 -p 8080:8080 -e SERVICES=sqs localstack/localstack

  • Optional: create file payload.json with your content

@adamatti
adamatti / 00_README.md
Last active November 1, 2019 16:48
Meetup Micronaut #meetup #micronaut
@adamatti
adamatti / openhackrs-principios.adoc
Last active December 13, 2019 17:46 — forked from dwildt/openhackrs-principios.txt
Open Hack RS - Funcionamento base e princípios.

OpenHackRS - Open Hack Rio Grande do Sul

TL;DR; Queremos fazer eventos para codar. Reunir pessoas interessadas em desenvolvimento de software, interessadas em aprender novas tecnologias.

Quer participar de eventos? Se inscreva no https://www.meetup.com/OpenHackRS/.

Quer ajudar a organizar eventos? Procura pelo dwildt no Telegram.

Qual a ideia?