Skip to content

Instantly share code, notes, and snippets.

View claytonsilva's full-sized avatar
🏠
Working from home

Clayton Cavaleiro claytonsilva

🏠
Working from home
View GitHub Profile
@rishitells
rishitells / Jest_GitLab_CI.md
Last active May 31, 2024 07:51
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@devdrops
devdrops / text.md
Created October 9, 2020 19:11
TF Diff - Checando diferenças nos arquivos terraform

TF Diff - Checando diferenças nos arquivos terraform

Trabalha com Terraform?

Costuma reforçar o uso de terraform fmt nos Pull Requests do seu time?

Cansou de validar se os arquivos do Pull Request seguem corretamenta a sintaxe?

@kquinsland
kquinsland / dummy0.netdev
Created December 3, 2019 02:54
How to get consul-agent and systemd.resolvd to co-exist peicefully and still be able to resolve *.consul hostsnames from within docker
# Creates a "dummy" network interface
# we'll configure this interface with a link-local address
# See: https://www.freedesktop.org/software/systemd/man/systemd.netdev.html
##
[NetDev]
Name=dummy0
Kind=dummy
function remove-docker-containers
echo "Stop running shit"
docker stop (docker ps -q)
echo "Remove the whale shit"
docker rm (docker ps -a -q)
end
function remove-docker-images
remove-docker-containers
@wkrueger
wkrueger / promise.md
Last active May 4, 2020 14:37
Guia Promise

Guia Promises

Pode-se afirmar que no momento Promises são a forma mais "padrão" no momento de se tratar com assincronismo no JS. Para quem trabalha com javascript, conhecê-las é essencial. Uma dificuldade comum é que esta API tem uma curva de aprendizado um tanto acentuada de início, especialmente se comparado com as alternativas mais antigas: callbacks e o módulo async. No meu caso, levei ao menos uns 3 meses pra "cair a ficha".

-- na verdade promises ainda são um remendo para o problema do assincronismo do JS. Elas ainda possuem certa dificuldade

import slick.model.Model
import slick.driver.PostgresDriver
import Config._
import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
import slick.codegen.SourceCodeGenerator
import slick.jdbc.meta.MTable
import slick.model.Column