Skip to content

Instantly share code, notes, and snippets.

View tobiashochguertel's full-sized avatar
👋

Tobias Hochgürtel tobiashochguertel

👋
View GitHub Profile
@tobiashochguertel
tobiashochguertel / #git-submodule-manager-GistSummary
Last active April 17, 2026 14:19
git-submodule-manager: Comprehensive Git Submodule Management Tool - PEP 723 uv inline script with rich output and workflow automation
# git-submodule-manager
Comprehensive Git Submodule Management Tool
A PEP 723 uv inline Python script for managing git submodules with:
• Rich terminal output with tables and colors
• Status checking, workflow automation, JSON output
• Automated pull/push workflows with correct order
Install: curl -fsSL https://gist.github.com/tobiashochguertel/e07a0a79b3ce8e7d157405d6845e473e/raw/install.sh | bash
@tobiashochguertel
tobiashochguertel / #task-help-GistSummary
Last active April 17, 2026 14:19
task-help: pretty-print Taskfile tasks grouped by namespace with ANSI colours (PEP 723 uv inline script)
# task-help
Pretty-Print Taskfile Tasks with Rich Grouped Output
A PEP 723 uv inline Python script that displays Taskfile tasks grouped by
namespace with ANSI colors, emoji headers, and customizable configuration.
Install: curl -fsSL https://gist.github.com/tobiashochguertel/261c54d64fff6dc1493619e2924161b4/raw/install.sh | bash
@wojtekmaj
wojtekmaj / jest-to-vitest.sh
Last active February 2, 2026 23:05
Automatically migrate Jest project to Vitest
#!/bin/bash
# Ensure we're working on the latest version of the main branch
git switch main
git fetch
git pull
# Create a new branch
git switch -c vitest
@nebriv
nebriv / DDM2.0.md
Last active April 17, 2026 18:33
Dell Display Manager 2.0 command line documentation

Dell Display Manager 2.0 Command Line

Decompiled DLL with ILSpy to identify various commands.

Most commands can be found in DDM2._0_UX.CmdBackground.cmdService_DoWork

Write commands can be prefixed with int:command to specify which monitor to send the command to.

.\DDM.exe /0:writebrightnesslevel 50

@silassare
silassare / fix-esm-import-paths.js
Created July 21, 2022 09:58
Browse a folder and try to change all esm import `from`, by auto prefixing `.js` or `/index.js` only if this file exists.
import * as fs from 'fs';
import * as path from 'path';
// https://gist.github.com/lovasoa/8691344
async function* walk(dir) {
for await (const d of await fs.promises.opendir(dir)) {
const entry = path.join(dir, d.name);
if (d.isDirectory()) {
yield* walk(entry);
} else if (d.isFile()) {
@panzi
panzi / jqlog.sh
Created April 6, 2022 21:06
Follow JSON logs formatted using jq. You can also pass jq options after the filename for filtering.
#!/usr/bin/bash
set -eo pipefail
RED=$(echo -e '\033[0;1;31m')
NORMAL=$(echo -e '\033[0m')
if [[ $# -lt 1 ]]; then
echo "usage: $0 <logfile> [jq-options...]">&2
exit 1
fi
logfile=$1
shift
@carstencodes
carstencodes / .gitlab-ci.yml
Last active October 8, 2025 16:53
PDM (the Python Development Master) based approach to automatically update your dependencies in pdm.lock
# Instructions for gitlab are yet to come.
@mattmc3
mattmc3 / optparsing_demo.zsh
Last active May 6, 2026 22:50
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@tomdaley92
tomdaley92 / README.md
Last active May 3, 2026 09:55
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@sergeiwaigant
sergeiwaigant / url_encode_string_with_linux_tools.md
Last active April 4, 2026 18:56
Simply URL encode string with Linux/Bash/Shell tools

Reference https://stackoverflow.com/a/34407620/13287790

$ printf %s 'encode this'|jq -sRr @uri
encode%20this

$ jq -rn --arg x 'encode this' '$x|@uri'
encode%20this

# -r (--raw-output) outputs the raw contents of strings instead of JSON string literals. -n (--null-input) doesn't read input from STDIN.