Skip to content

Instantly share code, notes, and snippets.

@tobiashochguertel
tobiashochguertel / README.md
Last active March 6, 2026 12:24
task-help: pretty-print Taskfile tasks grouped by namespace with ANSI colours (PEP 723 uv inline script)

task-help — pretty Taskfile task listing

A standalone Python script (PEP 723 uv inline, zero external deps) that pretty-prints all Taskfile tasks grouped by namespace with ANSI colours and emoji headers.

Run task with no arguments to get a structured overview instead of a raw alphabetical dump.

@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 February 11, 2026 22:37
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 December 2, 2025 17:37
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 March 4, 2026 21:56
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 January 9, 2026 21:10
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.
@maratori
maratori / .golangci.yml
Last active February 10, 2026 18:11
Golden config for golangci-lint
# ==================================================================================================
#
# NOTICE
#
# This gist is no longer maintained. It was moved to repo:
#
# https://github.com/maratori/golangci-lint-config
#
# Full history and all v2 releases are preserved in the repo.
#