Skip to content

Instantly share code, notes, and snippets.

View laurybueno's full-sized avatar

Laury Bueno laurybueno

View GitHub Profile
@laurybueno
laurybueno / clean-k8s.sh
Last active January 17, 2019 18:39
Clean a kubernetes worker from any configuration before adding it to a new cluster
docker rm -f $(docker ps -qa)
docker rmi $(docker images -a -q)
docker volume rm -f $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
@laurybueno
laurybueno / media_aprendizado_ideb.py
Created December 13, 2019 17:59
Calculadora simples de Proficiência Média Padronizada (parte da base de cálculo do Ideb)
# Calculadora simples de Proficiência Média Padronizada (parte da base de cálculo do Ideb)
## Referência: http://download.inep.gov.br/educacao_basica/portal_ideb/o_que_e_o_ideb/Nota_Tecnica_n1_concepcaoIDEB.pdf
# "limites" são valores constantes determinados pelo Ideb de 1997
limites = {
'matematica': {
'5ano': {
'inferior': 60,
'superior': 322
},
@laurybueno
laurybueno / fizzbuzz.ipynb
Last active June 18, 2020 16:45
Fizzbuzz - a Pyhton solution with timings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@laurybueno
laurybueno / docker.yml
Last active November 13, 2022 17:43
Use Lima as a Docker Desktop replacement on MacOS
images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20220902/ubuntu-22.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:c777670007cc5f132417b9e0bc01367ccfc2a989951ffa225bb1952917c3aa81"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20220902/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:9620f479bd5a6cbf1e805654d41b27f4fc56ef20f916c8331558241734de81ae"
cpus: 8
memory: 8GiB