Skip to content

Instantly share code, notes, and snippets.

View robsonandradev's full-sized avatar
🛠️
Always working to be my best version

Robson Andrade robsonandradev

🛠️
Always working to be my best version
View GitHub Profile
@robsonandradev
robsonandradev / test.js
Last active November 6, 2019 21:34
test this
alert("I was here");
@robsonandradev
robsonandradev / Encapsulamento.java
Created August 30, 2017 00:44
Exemplo de encapsulamento
// Exemplo de encapsulamento
public class Div {
private int num;
public int getNum() {
return this.num;
}
public int setNum(int num) {
this.num = num;
}
}
@robsonandradev
robsonandradev / DockerCleanUp.sh
Created April 15, 2018 13:50
Script to clean up docker conainer and images unused
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
sudo find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@robsonandradev
robsonandradev / ubuntuUpgrad.sh
Created August 18, 2019 14:22
Script to upgrade ubuntu distro
sudo apt update -y && sudo apt upgrade -y
sudo apt dist-upgrade
sudo apt autoremove
# Configure the release upgrader. Open and edit the /etc/update-manager/release-upgrades file
# and ensure that the Prompt variable is set to normal
# Default behavior for the release upgrader.
#[DEFAULT]
@robsonandradev
robsonandradev / .env
Created September 19, 2019 19:25
pythonLintResolveLocalPackages
PYTHONPATH=bin/
root = true
[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@robsonandradev
robsonandradev / .npmrc
Last active March 26, 2020 16:57
Github npm server
registry=https://npm.pkg.github.com/RobsonAndraDev
@robsonandradev
robsonandradev / k8s_installer.sh
Created January 16, 2021 21:08
k8s_installer.sh
#!/bin/bash
curl -fsSL https://get.docker.com/ -o docker.sh
sh docker.sh
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt update -y
---
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
infra: infra
app: gh-runner
name: gh-runner
namespace: infra
spec: