Skip to content

Instantly share code, notes, and snippets.

@travishegner
travishegner / haproxy2apache
Last active May 6, 2022 15:44
A quick bash one liner to convert haproxy logs to something like apache logs so that logstalgia can read them
tail -f log | stdbuf -o0 awk '{print $9" "$6" - - "$7" "$18" "$19" "$20" "$11" "$12}' | sed -u "s/:[0-9]\{4,5\}//g" | sed -u "s/\(:[0-6][0-9]\)\.[0-9]\{3\}/\\1 -400/g" | logstalgia --sync --paddle-mode vhost
#!/usr/bin/env python
__author__ = "[email protected]"
# This program lets your blink1 device blink whenever Pi-hole has filtered ads
# Have fun.
# blink1 commandline tool: https://github.com/todbot/blink1/blob/master/docs/blink1-tool.md
# Pi-hole https://github.com/pi-hole/pi-hole
# To start this as a service I would recommend using supervisord
@jossef
jossef / force-delete-k8s-namespace.py
Created August 13, 2020 12:50
force delete k8s namespace
#!/usr/bin/env python3
import atexit
import json
import requests
import subprocess
import sys
namespace = sys.argv[1]
proxy_process = subprocess.Popen(['kubectl', 'proxy'])
atexit.register(proxy_process.kill)