Skip to content

Instantly share code, notes, and snippets.

@tomcz
tomcz / git-bump.sh
Last active March 20, 2026 01:39
Bump repository semver tag
#!/usr/bin/env bash
set -e
USAGE_TEXT="Bump and tag the current repository using semantic versioning (https://semver.org/).
Usage: git-bump [options] [major|minor|patch]
Default: patch
Options:
@tomcz
tomcz / main.go
Created June 1, 2025 03:19
redis batch processing in golang
package main
import (
"context"
"errors"
"fmt"
log "log/slog"
"maps"
"math/rand/v2"
"os"
@tomcz
tomcz / diceware.sh
Last active January 5, 2025 00:46
Command line random password generator
#!/usr/bin/env bash
set -eo pipefail
# Ref: https://theworld.com/~reinhold/diceware.html
# Ref: https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
if [[ ! -x "$(command -v curl)" ]]; then
echo "Please install curl"
exit 1
fi