diff --git a/private_dot_local/bin/executable_gc.sh b/private_dot_local/bin/executable_gc.sh new file mode 100644 index 0000000..6766be5 --- /dev/null +++ b/private_dot_local/bin/executable_gc.sh @@ -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 diff --git a/private_dot_local/bin/executable_gitstats.sh b/private_dot_local/bin/executable_gitstats.sh new file mode 100644 index 0000000..c992f47 --- /dev/null +++ b/private_dot_local/bin/executable_gitstats.sh @@ -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 + diff --git a/private_dot_local/bin/executable_sshtunnel.sh b/private_dot_local/bin/executable_sshtunnel.sh new file mode 100644 index 0000000..b1c77c8 --- /dev/null +++ b/private_dot_local/bin/executable_sshtunnel.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ssh -o ObscureKeystrokeTiming=no -D 1337 "$1" \ No newline at end of file