Skip to content

Instantly share code, notes, and snippets.

View gbarre's full-sized avatar

Guillaume BARRÉ gbarre

View GitHub Profile
@gbarre
gbarre / cleanup_k8s.sh
Created February 8, 2021 13:55
Removes all traces of kubernetes on a node
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@gbarre
gbarre / Install_zsh.md
Created January 28, 2021 14:23
How to install my zsh environment

MyScripts

A simple repo to store my srcipts.

Install procedure

# Prepare
sudo apt install -y vim curl
mkdir ~/git && cd ~/git
@gbarre
gbarre / gandi.sh
Created May 12, 2020 14:09
Update DNS A record with Gandi's API
#!/bin/sh
# Customize with your datas
APIKEY="secret_token"
DOMAIN="my_domain"
RECORD="my_record"
# DO NOT EDIT AFTER THIS LINE
CURRENTIP=$(curl -s ifconfig.co/ip)
IPLENGTH=$(echo -n ${CURRENTIP} | wc -m)
@gbarre
gbarre / zshrc
Last active January 9, 2024 15:34
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# User configuration
export PATH=/usr/local/bin:$PATH