Skip to content

Instantly share code, notes, and snippets.

View CodeAdminDe's full-sized avatar

Frederic Roggon CodeAdminDe

  • Hamburg, Germany
View GitHub Profile
@CodeAdminDe
CodeAdminDe / migrate_n8n_sqlite_to_postgres.sh
Created January 15, 2026 09:16 — forked from bl0wfish/migrate_n8n_sqlite_to_postgres.sh
Migrate n8n from SQLite to PostgreSQL
#!/usr/bin/env bash
set -euo pipefail
#############################################
# Configuration
#############################################
# Load .env file if present
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs -r)
@CodeAdminDe
CodeAdminDe / security-context-capabilities.yaml
Created January 6, 2026 17:33 — forked from anjmao/security-context-capabilities.yaml
Kubernetes security context all capabilities
apiVersion: v1
kind: Pod
metadata:
name: security-context-capabilities
spec:
containers:
- name: example
image: gcr.io/google-samples/node-hello:1.0
securityContext:
capabilities:
@CodeAdminDe
CodeAdminDe / urlsafari
Created December 15, 2025 14:33 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@CodeAdminDe
CodeAdminDe / docker-compose.yaml
Created June 23, 2025 18:06
Talos PXE boot from factory with netboot.xyz
---
services:
netbootxyz:
image: ghcr.io/netbootxyz/netbootxyz
container_name: netbootxyz
environment:
- MENU_VERSION=2.0.84 # optional
- NGINX_PORT=80 # optional
- WEB_APP_PORT=3000 # optional
- TFTPD_OPTS='--tftp-single-port'
@CodeAdminDe
CodeAdminDe / azure-sentinel-solutions-nginx-analytics-rules-merged.yaml
Created April 28, 2025 06:55
Azure Sentinel NGINX analytic rules // Merged analytic rules based on offical solution provided by https://github.com/Azure/Azure-Sentinel/
# Merged Azure Sentinel analytics rules for reference and quick access.
# Original rules from https://github.com/Azure/Azure-Sentinel/tree/a49751dd87f6cab723010d60ee0e7518456532a5/Solutions/NGINX%20HTTP%20Server/Analytic%20Rules
#
---
id: d84739ce-2f46-4391-b25e-a2edbea19d7e
name: NGINX - Command in URI
description: |
'Detects command in URI'
severity: High
status: Available
@CodeAdminDe
CodeAdminDe / vyos_installation_hetzner_cloud.md
Created April 20, 2025 19:18 — forked from c0m4r/vyos_installation_hetzner_cloud.md
VyOS installation on Hetzner Cloud VPS

VyOS installation on Hetzner Cloud VPS

This guide explains how to install the VyOS Rolling Release (free nightly builds) on Hetzner Cloud VPS. This might also work for other VPS providers with the proper rescue system in place.

First log into Hetzner Cloud, switch to your VPS control panel, select Rescue -> Enable Rescue and Power Cycle. It takes up to 1 minute to boot into rescue mode. Your login details will be displayed in the control panel after you activate the console. You can also use previously defined SSH keys.

Hetzner Rescue SSH

Download and write the ISO image in the Rescue environment:

@CodeAdminDe
CodeAdminDe / jq to filter by value.md
Created April 16, 2025 08:11 — forked from ipbastola/jq to filter by value.md
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@CodeAdminDe
CodeAdminDe / talos-build.sh
Last active April 15, 2025 18:59 — forked from kvaps/talos-build.sh
How to build talos with custom kernel extensions
# Builds pkg
cd ./pkgs
git checkout release-1.10
make PKGS_PREFIX=ghcr.io/kvaps/talos PUSH=1 USERNAME=kvaps/talos PLATFORM=linux/amd64
# output would be:
# => pushing manifest for ghcr.io/kvaps/talos/base:v1.9.0-15-g45c4ba4-dirty@sha256:f3d0f691752e3158c4f36b05e4b5abad2e68437f0faa0928887e69e568ca364d
# Builds talos (with clustom pkgs)
cd ./talos
@CodeAdminDe
CodeAdminDe / syslog-ng.conf
Last active April 15, 2025 06:56
Simple, minimal syslog-ng.conf to configure a debug syslog server at 514/udp.
@version: 4.3
@include "scl.conf"
source customsrc { udp(); };
destination customdest { file("/var/log/syslog-ng.log"); };
log { source(customsrc); destination(customdest); };
@CodeAdminDe
CodeAdminDe / wgCarpFailover.php
Created February 8, 2025 20:33
pfSense HA Failover // Custom script to handle WireGuard tunnel status based on CARP VIP status
#!/usr/local/bin/php-cgi -f
<?php
#
# Copyright by Frederic Roggon <[email protected]>
# License: GPL-3.0-or-later (https://spdx.org/licenses/GPL-3.0-or-later.html)
#
#
#this files goes at /custom as wgCarpFailover.php on primary and secondary firewall and needs chmod +x permissions
# set a shellcmd command with the following content "nohup /custom/wgCarpFailoverUpDown.php >/dev/null 2>&1 &" (w/o ").
require_once("config.inc");