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 / 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 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