Skip to content

Instantly share code, notes, and snippets.

@mogoh
mogoh / one-time-docker.bash
Created April 7, 2025 15:33
Simple Bash Script Template to Run a Script inside a Docker Container Once
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
@mogoh
mogoh / Replace distutils.spawn.find_executable with shutil.which
Last active October 26, 2025 11:26 — forked from ssokolow/update_flatpak_cli.py
Utility for making Flatpak-installed apps available in the terminal through their normal command names
#!/usr/bin/env python3
"""Flatpak CLI Shortcut Generator
A simple no-argument tool that generates launchers with traditional non-flatpak
command names for your installed Flatpak applications in ~/.local/bin/flatpak.
Does full collision detection and warns you if you forgot to add its output
directory to your PATH. Also overrules the command-line specified in the
``.desktop`` file if the Flatpak maintainer didn't include support for
command-line arguments.