Skip to content

Instantly share code, notes, and snippets.

View abraaojs's full-sized avatar

Abraão Silva abraaojs

View GitHub Profile
#!/usr/bin/env bash
LIQUIBASE_VERSION=3.6.3
LIQUIBASE_PREFIX=/usr/local/lib
LIQUIBASE_BIN=/usr/local/bin
JDBC_POSTGRES_VERSION=42.2.6
JDBC_MYSQL_VERSION=2.4.2
##############################################################################
# Install Liquibase
@abraaojs
abraaojs / docker-iptables-cleanup.sh
Created January 10, 2020 20:18
docker iptables cleanup rancher
docker rm -f $(sudo docker ps -aq);
docker volume rm $(sudo docker volume ls -q);
rm -rf /etc/ceph \
/etc/cni \
/etc/kubernetes \
/opt/cni \
/opt/rke \
/run/secrets/kubernetes.io \
/run/calico \
@abraaojs
abraaojs / install_docker_centos7.sh
Last active August 17, 2023 08:40
Script to install docker-ce on centos 7
#!/bin/bash
# Created by Abraão Silva
# Install docker in centos
# Remove any old versions
sudo yum remove docker docker-common docker-selinux docker-engine
# Install required packages
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
@abraaojs
abraaojs / openshift-mapit-spring-template.yaml
Created November 11, 2019 15:12
openshift-mapit-spring-template.yaml
apiVersion: v1
kind: Template
labels:
demo: openshift-mapit-spring-template
metadata:
annotations:
description: openshift-mapit-spring Spring Boot Geo Spatial Application Template
iconClass: icon-java
tags: microservice,spring
name: openshift-mapit-spring-template
@abraaojs
abraaojs / commands-list.txt
Last active October 1, 2019 20:06
kubernetes commands list
## Comandos Kubernetes ##
kubectl delete daemonsets,replicasets,services,deployments,pods,rc --all
kubectl get pods -o jsonpath="{.items[*].metadata.name}" | \
tr " " "\n" | \
xargs -i -P 0 kubectl delete pods {}
kubectl delete pods --all
@abraaojs
abraaojs / gcp-shutdown.sh
Last active April 20, 2020 07:49
gcp-shutdown.sh
#!/bin/bash
# created by abraaojs
# Add to instance metadata with `gcloud compute instances add-metadata \
# instance-name --metadata-from-file startup-script=gcp-shutdown.sh` and reboot
# NOTE: requires `bc`, eg, sudo apt-get install bc
# Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage
threshold=0.1
count=0
wait_minutes=60