add scripts

This commit is contained in:
c c 2026-06-22 17:31:03 +02:00
commit e252cb7e78
3 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#! /usr/bin/env bash
uv cache clean
podman container prune
podman image prune
podman system prune -a
rm -rf ~/.local/share/containers
flatpak uninstall --unused
sudo pacman -Sc

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Usage examples:
# ./gitstats.sh --since '1 month ago';
# ./gitstats.sh --since '1 month ago' --until '1 day ago';
# ./gitstats.sh --author 'GreenRaccoon23' --since '1 month ago' --until '1 day ago';
_commitStats() {
git log --pretty=format:'noop' "$@" | awk 'END {print NR, "commits"}';
};
_lineStats() {
git log --pretty=format:'' --numstat "$@" | awk 'NF' | awk '{insertions+=$1; deletions+=$2} END {print NR, "files changed,", insertions, "insertions(+),", deletions, "deletions(+)"}';
};
_commitStats "$@";
_lineStats "$@";
# Credits:
# https://stackoverflow.com/a/48575013/4257217
# https://stackoverflow.com/a/4593065/4257217
# https://gist.github.com/Xeoncross/4020489

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ssh -o ObscureKeystrokeTiming=no -D 1337 "$1"