Skip to content

Instantly share code, notes, and snippets.

View dargmuesli's full-sized avatar
🎧
https://creal.jonas-thelemann.de

Jonas Thelemann dargmuesli

🎧
https://creal.jonas-thelemann.de
View GitHub Profile
@dargmuesli
dargmuesli / documentation.md
Last active March 30, 2025 01:11
CONTRIBUTING

Documentation

Markdown

Write one sentence per line to make git diffs well readable.

@dargmuesli
dargmuesli / backup-docker-secrets.sh
Last active September 8, 2026 23:59 — forked from kwonghung-YIP/backup-docker-secrets.sh
Shell script for export all secrets defined in docker swarm
#!/bin/bash
# Dumps every swarm secret into a tar by mounting them all into a throwaway service.
# The tar holds plaintext secrets: encrypt it before moving it off this host.
set -euo pipefail
umask 077
service_name="backup-all-secrets"
out_dir="${1:-.}"
tar_file="backup_$(date +"%Y%m%d-%H%M%S").tar"
@dargmuesli
dargmuesli / localhost-dns.md
Created November 7, 2022 20:12
DNS setup instructions for development .test TLD resolution on localhost.

DNS

Within development of a DargStack, access to the web apps should be routed via the locally resolved domain [project_name].test and its subdomains. Therefore one needs to configure the local DNS resolution to make this address resolvable. This can either be done by simply adding this domain and all subdomains to the operation system's hosts file or by setting up a local DNS server. An advantage of the latter method is that subdomain wildcards can be used and thus not every subdomain needs to be defined separately.

Here is an example configuration for dnsmasq that uses the local DNS server on top of the router's advertised DNS server:

Details
@dargmuesli
dargmuesli / presenter.sh
Last active March 5, 2021 11:08
Replace a keebinding for a Doosl wireless presenter on Linux.
#!/bin/bash
# Use evtest on last "Genius Wireless Mouse" device.
cat >"/etc/udev/hwdb.d/90-custom-presenter.hwdb" <<EOL
evdev:input:b0003v0458p0189*
KEYBOARD_KEY_70051=space
KEYBOARD_KEY_70052=p
EOL
sudo systemd-hwdb update
sudo udevadm trigger
@dargmuesli
dargmuesli / portainer-start-local.sh
Last active October 3, 2024 04:20
Portainer Start Local
#!/bin/bash
# default
sudo docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
# rootless
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v "$XDG_RUNTIME_DIR/docker.sock:/var/run/docker.sock" -v portainer_data:/data portainer/portainer-ce

Keybase proof

I hereby claim:

  • I am dargmuesli on github.
  • I am dargmuesli (https://keybase.io/dargmuesli) on keybase.
  • I have a public key ASBwtIR5hr5ptYEqz_iJX0sDfbTEhLvlcPoJ_SncMQsojgo

To claim this, I am signing this object:

@dargmuesli
dargmuesli / heuteheutemorgenmorgen.md
Last active November 27, 2023 10:42
A reference for sleep & time based wording issues.
verwirrend cool verwirrend cool
@dargmuesli
dargmuesli / vserver-setup-debian.sh
Last active September 8, 2026 22:29
Initial hardening/setup script for a fresh Debian VPS.
#!/usr/bin/env bash
#
# vserver-setup-debian.sh
# Initial hardening/setup script for a fresh Debian 12/13 VPS.
#
# USAGE:
# 1. Edit the CONFIG section below (username, SSH port, timezone, hostname).
# 2. Put your SSH public key in SSH_PUBKEY, or have it in root's
# authorized_keys already; the script refuses to run without one.
# 3. Run as root: bash vserver-setup-debian.sh