Skip to content

Instantly share code, notes, and snippets.

@MegalodonBite
MegalodonBite / k8s-drain.sh
Created September 20, 2023 10:01 — forked from juliohm1978/k8s-drain.sh
Drains a Kubernetes node using "rollout restart" instead "kubectl drain". See comments for motiviation and usage.
#!/bin/bash
NODE_NAME=$1
ROLLOUT_CMD=$2
if [[ "$NODE_NAME" == "" ]]; then
echo "
USAGE: ./drain.sh <NODE_NAME>
Drains a node from its Deployments/Stateful set pods.
@MegalodonBite
MegalodonBite / .bashrc
Created August 10, 2023 07:07 — forked from nash403/.bashrc
Automatically enable/disable proxy settings from command line
# Show proxy settings
function proxy_show(){
env | grep -e _PROXY -e _proxy | sort
}
# Configure proxy
function proxy_on(){
# You may need to hardcode your password, proxy server, and proxy port
# if the following variables do not exist
export HTTP_PROXY="http://$USERNAME:$PASSWORD@$PROXY_SERVER:$PROXY_PORT"
@MegalodonBite
MegalodonBite / kubernetes_service_session_affinity.md
Created August 8, 2023 07:40 — forked from fjudith/kubernetes_service_session_affinity.md
Enable Session Affinity (a.k.a Sticky Session) to Kubernetes service
@MegalodonBite
MegalodonBite / borg.sh
Created April 4, 2023 14:06 — forked from matthinc/borg.sh
Script for using borg-backup with Hetzner storagebox
#!/usr/bin/env bash
########## Configuration ##########
SSH_PASSWD="" # SSH password of the storagebox
BORG_USER="" # Storagebox user
BORG_SERVER="xxx.your-storagebox.de" # Storagebox
BORG_REPO="~/borg" # Borg repository on the storagebox
FILES="/home /opt" # Files to backup (space separated)
###################################
@MegalodonBite
MegalodonBite / dbeaver.ini
Last active March 15, 2023 11:26 — forked from souhaiebtar/dbeaver.ini
[dbeaver config file] .ini file for dbeaver #dbeaver #linux
# path on linux /usr/share/dbeaver/dbeaver.ini
# path on macos /Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
-vm
/usr/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-vmargs
-XX:+IgnoreUnrecognizedVMOptions