Skip to content

Instantly share code, notes, and snippets.

# CrowdSec local customization for Traefik logs behind Cloudflare.
#
# Traefik sees the Cloudflare edge server as the connection source, so the
# standard crowdsecurity/traefik-logs parser initially sets evt.Meta.source_ip
# to the Cloudflare edge IP (for example, 104.23.251.67). Traefik also preserves
# the original client address in the CF-Connecting-IP request header.
#
# For this header to appear in the Traefik JSON access log, Traefik must
# explicitly retain it in its access-log configuration, e.g.:
#
@iconoclasthero
iconoclasthero / docker-ps
Last active August 20, 2026 23:05
docker-ps is a colorized, human-readable version of `docker ps`
#!/bin/bash
# ☢=u+2622
: "${TERM:=xterm-256color}"
editscript(){
local scriptpath script path swp; scriptpath=$(realpath "$0" 2>/dev/null); script="${scriptpath##*/}"; path="${scriptpath%/*}"; swp="$path/.$script.swp"
[[ ! -e "$swp" ]] && printf "\n\n%s\n\n" "$swp" && (/usr/bin/nano "$scriptpath") && exit
printf "\n%s is already being edited.\n%s exists; try fg or look in another window.\n" "$scriptpath" "$swp"; exit ;}
@iconoclasthero
iconoclasthero / VNC_Server_On_Ubuntu_22.04LTS.md
Last active February 20, 2024 15:28 — forked from indyfromoz/VNC_Server_On_Ubuntu_22.04LTS.md
VNC Server setup on Ubuntu 22.04 LTS

Setup

Install TigerVNC -

$ sudo apt install tigervnc-standalone-server

Configure VNC Server by running

@iconoclasthero
iconoclasthero / inhibit esm.sh
Last active March 11, 2023 18:08
How to remove the fucking Canonical ESM messages upon Ubuntu terminal login:
#!/bin/bash
# see https://askubuntu.com/questions/1453749/inhibit-esm-messages-at-login
# for more reference
# worked on Ubuntu 22.x
scriptname="$(realpath $0)"
function removeesm(){
sudo sed -Ezi.orig \