From bc58d71ed5db0d910d7ba9432829e97f8e9535c2 Mon Sep 17 00:00:00 2001 From: Random936 Date: Sat, 28 Mar 2026 17:33:57 -0400 Subject: [PATCH] Added new reconcile and pom scripts --- ledger/reconcile.sh | 12 ++++++++++++ nixos/update.sh | 2 +- prod/pom.sh | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ledger/reconcile.sh create mode 100644 prod/pom.sh diff --git a/ledger/reconcile.sh b/ledger/reconcile.sh new file mode 100644 index 0000000..c5189da --- /dev/null +++ b/ledger/reconcile.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +if [[ -f "~/.simplefin.enc" ]]; then + echo "Simplefin access URL is missing." + echo "Please run the setup script before running update." + exit +fi + +SCRIPT_DIR="$(dirname -- "${BASH_SOURCE[0]}")" +ACCESS_URL="$(cat ~/.simplefin.enc | openssl aes-256-cbc -d -a -salt -pbkdf2 -iter 1000000)" + +curl -L "${ACCESS_URL}/accounts?start-date=$(date '+%s')&pending=1" | jq -rc '.accounts | map({name, balance})[]' diff --git a/nixos/update.sh b/nixos/update.sh index 252f1d0..add9283 100755 --- a/nixos/update.sh +++ b/nixos/update.sh @@ -13,7 +13,7 @@ update() { ssh media@media.randomctf.com -t "$(typeset -f update); update" ssh logging@logging.randomctf.local -t "$(typeset -f update); update" ssh mindforge@mindforge.randomctf.local -t "$(typeset -f update); update" -ssh sampledb@sampledb.randomctf.local -t "$(typeset -f update); update" +ssh mnemosyne@mnemosyne.randomctf.local -t "$(typeset -f update); update" # Ubuntu VMs ssh pbx@pbx.randomctf.local -t "sudo apt update -y && sudo apt upgrade -y" diff --git a/prod/pom.sh b/prod/pom.sh new file mode 100644 index 0000000..d33f422 --- /dev/null +++ b/prod/pom.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + + +cycle_raw=$(gum choose --header="Choose your pomodoro cycle for work/break." "50/10" "25/5") +work_time=$(echo "$cycle_raw" | cut -d/ -f 1) +break_time=$(echo "$cycle_raw" | cut -d/ -f 2) + +while true; do + timer "${work_time}m" + + if gum confirm "Do you want to take a break?"; then + timer "${break_time}m" + fi + + if ! gum confirm "Do you want to resume working?"; then + break + fi +done