Compare commits

..

2 Commits

Author SHA1 Message Date
Random936
bc58d71ed5 Added new reconcile and pom scripts 2026-03-28 17:34:25 -04:00
Jaden Provost Maxwell-Comfort
5c36c869cd Separated idrac scripts to be server specific 2026-02-22 18:26:32 -08:00
9 changed files with 43 additions and 1 deletions

12
ledger/reconcile.sh Normal file
View File

@@ -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})[]'

View File

@@ -13,7 +13,7 @@ update() {
ssh media@media.randomctf.com -t "$(typeset -f update); update" ssh media@media.randomctf.com -t "$(typeset -f update); update"
ssh logging@logging.randomctf.local -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 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 # Ubuntu VMs
ssh pbx@pbx.randomctf.local -t "sudo apt update -y && sudo apt upgrade -y" ssh pbx@pbx.randomctf.local -t "sudo apt update -y && sudo apt upgrade -y"

18
prod/pom.sh Normal file
View File

@@ -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

3
r330/start.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sshpass -p "$(rbw get iDRAC)" ssh root@192.168.100.11 racadm serveraction powerup

3
r330/status.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sshpass -p "$(rbw get iDRAC)" ssh root@192.168.100.11 racadm serveraction powerstatus

3
r330/stop.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sshpass -p "$(rbw get iDRAC)" ssh root@192.168.100.11 racadm serveraction graceshutdown

3
r730xd/status.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
sshpass -p "$(rbw get iDRAC)" ssh root@192.168.100.12 racadm serveraction powerstatus