Skip to content

Instantly share code, notes, and snippets.

View jmetzger's full-sized avatar

Jochen "im Blaumann" Metzger jmetzger

View GitHub Profile
@jmetzger
jmetzger / start-wsl-setup.bat
Last active June 4, 2026 06:49
WSL von aussen erreichbar machen: SSH (Port 2222) + Web-Ports (8080, 3000) mit Auto-Start und Firewall
@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0wsl-setup.ps1"
@jmetzger
jmetzger / 0_README.md
Last active June 10, 2026 05:30
Claude Code Hooks: sops/.env.enc Entschlüsselung & Leseschutz für sensitive Dateien

Claude Code Hooks: sops + age Verschlüsselung & Credential-Schutz

Zwei Schutzschichten stellen sicher, dass Secrets niemals im LLM-Kontext landen – weder durch direktes Lesen noch durch Ausgabe in der Shell, noch durch Muster im Bash-Output.

Architektur

Claude führt Bash aus     →  PreToolUse: inject_env.sh           →  Env-Vars vorangestellt (sops on-the-fly)
Claude führt Bash aus → PreToolUse: block_env_output.sh → BLOCKED wenn env/printenv/echo $SECRET
/**
* draw.io Plugin: Quick Nodes
*
* Extras → "Quick Nodes" – eine Node-Bezeichnung pro Zeile.
* Zeichnet die Boxen in einem Raster auf dem Canvas.
*
* Installation:
* draw.io Desktop: Extras → Plugins → Add → diese Datei → Neustart
*/
Draw.loadPlugin(function (ui) {
@jmetzger
jmetzger / puppet-install-etch.sh
Last active October 11, 2016 10:40
puppet-debian-etch-installer
#!/bin/bash
###
# This script install puppet version 3.7 (or better latest) on debian etch
MAJOR_VERSION=$(cat /etc/debian_version | cut -d'.' -f 1)
if [ $MAJOR_VERSION -ne 4 ]
then
@jmetzger
jmetzger / Applying-php::cli-2-wheezy.pp
Created November 20, 2014 12:26
Applying php::cli @thias-php to debian wheezy (https://forge.puppetlabs.com/thias/php)
class profile::www::typo3::wheezy {
# debian specific
$cli_inifile = '/etc/php5/cli/php.ini'
file { '/etc/php5':
ensure => 'directory'
} ->
file { '/etc/php5/cli':
@jmetzger
jmetzger / git-download-private-repo-tarball.sh
Last active July 21, 2023 21:58
Git-Downloader for private repo
#!/bin/bash
CF=~/.git-dprz.sh
function info {
cat <<- INFO
-- Script for downloading PRIVATE(!) git-repos as tar-archive on old systems (like Debian Etch)
-- That only have old git - binaries
--
@jmetzger
jmetzger / Typo3-Installer.md
Last active August 29, 2015 14:09
Typo3 - Get last released version - for bash script (Typo3 6.2. + Typo3 4.5)

Typo3 - Downloader

Put both files in the same directory. Execute the downloader - script

/bin/bash typo3_download_latest.sh

The script will check, if the downloaded file exists already, if not download it.

@jmetzger
jmetzger / rewriteLocalconf45.php
Created November 18, 2014 16:45
Rewrite Your Localconf before updating to 6.2 (Get Rid of incompatibel extensions)
#!/usr/bin/php
<?php
class ConfigManager {
var $lines;
var $pathFilename;
var $uninstallExtensions;
public function __construct(){