Skip to content

Instantly share code, notes, and snippets.

View kimdre's full-sized avatar
👌
Yo!

Kim Oliver Drechsel kimdre

👌
Yo!
View GitHub Profile
@kimdre
kimdre / .bashrc
Last active February 29, 2024 13:12
kubectl alias for namespaces
function kns {
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo -e "Use kns to change or get the current namespace:\n"
echo -e " kns\t\t Show current namespace"
echo -e " kns <namespace> Change to namespace"
return 0
fi
if [ "$1" ]; then
namespaces="$(k get ns | grep "$1")"
@kimdre
kimdre / kustomize customManager renovate.json
Last active November 16, 2023 12:00
Example Renovate customManager for kustomize
// This is a example for a Renovate customManager to extract the kustomize version to compare with from its Github releases.
// Note the line with `extractVersionTemplate`, which is used to change the verson format what is used as the Github release versioning.
{
...
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^Dockerfile$"],
"matchStrings": ["ARG KUSTOMIZE_VERSION=(?<currentValue>.*?)\\n"],
@kimdre
kimdre / README.md
Last active March 6, 2024 00:50
Fail2ban Config for CheckMk Authentication over Web UI

CheckMk Web Auth Fail2ban Config

Fail2ban Config for CheckMk Authentication over Web UI

This is a example fail2ban config for failed login attempts in the CheckMK Web UI Login Form.

Setup

Check for log files

CheckMK logs failed login attempts for each site separately at ~/var/log/web.log (relative path from the site's user).

@kimdre
kimdre / imap-search
Created August 22, 2022 16:42 — forked from martinrusev/imap-search
IMAP Search criteria
@kimdre
kimdre / openshift_auto_login.sh
Last active August 11, 2022 21:10
Automated login to openshift
# Add this to your .bashrc or .zshrc etc.
function oc {
if [[ "$@" == "login" ]]
then
OS_USER="my_user"
OS_PASSWORD="my_password"
OS_URL="https://openshift.master.com:443"
echo Optaining api token...