Skip to content

Instantly share code, notes, and snippets.

View jesperronn's full-sized avatar

Jesper Rønn-Jensen jesperronn

View GitHub Profile
@jesperronn
jesperronn / podman_rootless_guide.md
Last active February 4, 2026 08:12
Guide for running Docker Compose on Rootless Podman -- February 2026 edition

The Ultimate Guide: Rootless Podman & Docker Compose on macOS

Knowledge Cut-Off: February 2024
Last Updated: February 2026


Table of Contents

  1. Introduction
  2. System-Level Setup & Persistence

💻 Bash Array Cheat Sheet

🔢 Indexed Arrays (The Default Array)

Indexed arrays use non-negative integers (0, 1, 2, ...) as keys.

Section Action Syntax Example
Declaration Declare & Init names=("Alice" "Bob" "Charlie") Creates an array with keys 0, 1, 2.
Basics Access Value ${names[1]} Output: "Bob"
@jesperronn
jesperronn / git.instructions.md
Last active December 3, 2025 13:49
.github/instructions/git.instructions.md
@jesperronn
jesperronn / bash-template.sh
Last active October 10, 2025 04:56
template for bash scripts
#!/usr/bin/env bash
#
# this file is a template for bash scripts
# it provides common functions and a standard structure for bash scripts
#
# curl -L --silent --remote-name https://gist.githubusercontent.com/jesperronn/c06371a3a2685af1a5eab71f543e09a5/raw/bash-template.sh && chmod +x bash-template.sh
#
# Agents can use this template to create new bash scripts quickly and easily.
#
# Format, there are 3 main sections:
@jesperronn
jesperronn / .editorconfig
Last active October 9, 2025 11:10
.editorconfig improve IntelliJ defaults (google-java-code, properties in UTF-8, etc)
# EditorConfig is awesome: https://EditorConfig.org
# USAGE:
# curl -L --silent --remote-name https://gist.githubusercontent.com/jesperronn/e5415bbbdbc6028db09c4943c108da1d/raw/.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
@jesperronn
jesperronn / docx2md.md
Last active May 22, 2025 20:00 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@jesperronn
jesperronn / keycloak_create_multi_idps.sh
Created April 23, 2025 08:57
creates multiple identity providers in Keycloak using the Keycloak API (curl)
#!/usr/bin/env bash
set -euo pipefail
# Author: Jesper Rønn-Jensen, Nine A/S
# Date: 2025-04-23
# Version: 1.0
# Description: This script creates multiple identity providers in Keycloak using the Keycloak API.
# Example on how to use Keycloaks API to create multiple Identity providers
# the script file here uses curl command to provide the example
# Direnv common sense configuration.
# This file is used to configure direnv, a shell extension that allows you to load and unload
# environment variables based on the current directory.
#
# This file is located in the $HOME/.config/direnv directory.
# It is loaded automatically by direnv when it starts up.
# $ cat $HOME/.config/direnv/direnv.toml
# see https://direnv.net/man/direnv.toml.1.html
@jesperronn
jesperronn / OidcSecurityClient.java
Last active September 20, 2024 11:04
Spring boot 3.3 example for OIDC client registration, which does not require HTTP request to discovery endpoint during startup
@Configuration
@NoArgsConstructor
@AllArgsConstructor
public class OAuth2LoginConfig {
@Value("${system.oauth2.client.id}")
private String adminClientId;
@Value("${system.oauth2.client.secret}")
private String adminClientSecret;
@jesperronn
jesperronn / releasenotes
Last active November 17, 2022 06:07
releasenotes script (with git)
#!/usr/bin/ruby
#
# release notes script
# takes two git tags and prints any changes between them
#
# usage:
# ./releasenotes.sh [from] [to] [releasename]
#
# with [from] and [to] being git tags