From 50f29bfac34f2673e131925a5bf916dfad7a8ed1 Mon Sep 17 00:00:00 2001 From: Will Budic Date: Fri, 17 Oct 2025 11:29:56 +1100 Subject: [PATCH] .upd --- crontab.lst | 18 +++++---- linux-B_L_R_via_sshfs/backup.sh | 43 +++++++++++++-------- vs_code_extensions.lst | 66 +++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 23 deletions(-) create mode 100644 vs_code_extensions.lst diff --git a/crontab.lst b/crontab.lst index fd99088..871873a 100644 --- a/crontab.lst +++ b/crontab.lst @@ -1,9 +1,11 @@ +HOME=/home/will +SHELL=/bin/bash # m h dom mon dow command -0 */3 * * * bash ~/cron_bitcoin.sh >> ~/cron.log 2>&1 -1 */4 * * * bash ~/cron_weather.sh >> ~/cron.log 2>&1 -3 */6 * * * bash ~/cron_exchange_rate.sh >> ~/cron.log 2>&1 -4 */4 * * * bash ~/cron_log_maintainer.sh > /dev/null 2>&1 -7 */8 * * * bash ~/cron_postgreSQL_backup.sh >> ~/cron.log 2>&1 -9 */8 * * * bash ~/cron_backup_nuc_to_local.sh >> ~/cron.log 2>&1 -0 8 * * 0 bash ~/cron_backup_to_nuc.sh >> ~/cron.log 2>&1 - +0 */3 * * * ~/cron_bitcoin.sh >> ~/cron.log 2>&1 +1 */4 * * * ~/cron_weather.sh >> ~/cron.log 2>&1 +3 */6 * * * ~/cron_exchange_rate.sh >> ~/cron.log 2>&1 +2 */16 * * * ~/cron_postgreSQL_backup.sh >> ~/cron.log 2>&1 +7 */16 * * * ~/cron_log_maintainer.sh >> ~/cron.log 2>&1 +9 */8 * * * ~/cron_backup_nuc_to_local.sh >> ~/cron.log 2>&1 +0 8 * * 0 ~/cron_backup_to_nuc.sh >> ~/cron.log 2>&1 +0 8 * * 1 ~/cron_clamscan.sh >> ~/cron.log 2>&1 diff --git a/linux-B_L_R_via_sshfs/backup.sh b/linux-B_L_R_via_sshfs/backup.sh index fd721b9..d142777 100755 --- a/linux-B_L_R_via_sshfs/backup.sh +++ b/linux-B_L_R_via_sshfs/backup.sh @@ -1,4 +1,11 @@ #!/bin/bash +CLR1=$'\x1b[38;5;87m' # cyan +CLR2=$'\x1b[38;5;211m' # magenta +CLR3=$'\x1b[38;5;120m' # green +CLR4=$'\x1b[38;5;241m' # dim +CLR5=$'\x1b[38;5;223m' # off-white (text) +RST=$'\x1b[0m' + # Included backup.config file is only to be modified as the copy in -> ~/.config/backup.config SRC_DIR=`dirname "$0"` if [[ -f ~/.config/backup.config ]]; then @@ -65,30 +72,31 @@ fi function showHelp (){ read -r -d '' help <<-__help \e[1;31mBackup Utility \e[0m - by Will Budić (Mon 30 May 2022)\e[17m - \e[32m This utility backups your home directory, via an backup.config file specified to an target directory.\e[0m + $CLR3 This utility backups your home directory, via an backup.config file specified to an target directory.\e[0m \e[1;33mUsage:\e[0;32m - +$CLR3 backup - Uses all defaults, see/modify this settings in ~/.config/backup.config. backup /media/path - Sets destination target to alternative /media/path, this will be checked. - +$RST \e[1;33mOptions:\e[0m - \e[0;37m--config\e[0;32m{=} {path} - Alternative to ~/.config/backup.config to load, potentialy overwritting default. - This option is usually used in combination with the --name posfix. + \e[0;37m--config\e[0;32m{=} {path} - Alternative to ~/.config/backup.config to load, potentially overwriting default. + This option is usually used in combination with the --name postfix. \e[0;37m--target\e[0;32m{=} {path} - Specifically assigned backup target path. - \e[0;37m--name=\e[0;32m{word} - Assign posfix name for current run, the default config doesn't use it or set it, - so an potetnially existing backup on the target will not be overwritten, + \e[0;37m--name=\e[0;32m{word} - Assign postfix name for current run, the default config doesn't use it or set it, + so an potentially existing backup on the target will not be overwritten, i.e. while testing. \e[0;37m--help\e[1;32m | \e[0;37m-?\e[0;32m - Prints this help. - + $CLR3 The reason for the backup command being semi-automatic via an config file, is to expect have everything setup in that file and usually run once in a week as a background cron job. Or from the command line. As an typical backup can take an long time to run. Use the enarch utility (file://$SRC_DIR/enarch.pl), for smaller e-safe archives instead. The resulting backup will be both encrypted and compressed as the final product. + $RST \e[31mWarning\e[0m -> \e[0;32mDo not keep an copy of the key or config file on the target or server computer. Store it in a password manager. Recomended passwprd manaker I use is -> https://keepassxc.org/ @@ -184,9 +192,10 @@ function DoBackup () { done if [[ ! -z $directories ]]; then - stat_m="Collecting files from: $directories"; + stat_m="Collecting files from: CLR1 $directories $RST"; echo "$stat_m"; stat_glob+="$stat_m\n"; + echo -e " /usr/bin/fdfind -H -t file -I $EXCLUDES . $directories | sort -d >> $BCK_LST" ; /usr/bin/fdfind -H -t file -I $EXCLUDES . $directories | sort -d >> $BCK_LST; [[ $? != 0 ]] && exit $?; fi @@ -229,12 +238,16 @@ function DoBackup () { if [[ "$BACKUP_VERBOSE" -eq 1 ]]; then while NFS= read -r file; do if [[ -n "$file" ]]; then - size=$(stat -c %s "$file"); - file_cnt=$(($file_cnt + 1)); - file_size=$(($file_size + $size)); - file_size=$(($file_size + ${#file})); + if [[ -f $file ]]; then + size=$(stat -c %s "$file"); + file_cnt=$(($file_cnt + 1)); + file_size=$(($file_size + $size)); + file_size=$(($file_size + ${#file})); + else + echo -e $CLR2 "Skipping not valid file ->$file" $CLR1 + fi fi - done < <(pv -N "Please wait, obtaining all file stats..." -pt -w 100 $BCK_LST); + done < <(pv -N "$CLR2 Please wait, obtaining all file stats...$CLR1" -pt -w 100 $BCK_LST); target_avail_space=$(df "$TARGET" | awk '{print $4}' | tail -n 1); file_size_formated=$(numfmt --to=iec-i "$file_size"); @@ -258,7 +271,7 @@ function DoBackup () { fi printLine; - echo " Started archiving! Archive Bulk to Compress is: $file_size_formated"; + echo "$CLR5 Started archiving! Archive Bulk to Compress is: $file_size_formated"; printLine; # Notice - tar archives and compresses in blocks, piped out to pv is not actual byte mass, hence no lineral progressbar. diff --git a/vs_code_extensions.lst b/vs_code_extensions.lst new file mode 100644 index 0000000..d70008b --- /dev/null +++ b/vs_code_extensions.lst @@ -0,0 +1,66 @@ +amodio.tsl-problem-matcher +analytic-signal.preview-html +bierner.github-markdown-preview +bierner.markdown-checkbox +bierner.markdown-emoji +bierner.markdown-footnotes +bierner.markdown-mermaid +bierner.markdown-preview-github-styles +bscan.perlnavigator +christian-kohler.npm-intellisense +davidanson.vscode-markdownlint +dbaeumer.vscode-eslint +donjayamanne.githistory +duox32.next +duox32.next-edu +duox32.next-snippets +eamodio.gitlens +ecmel.vscode-html-css +esbenp.prettier-vscode +firefox-devtools.vscode-firefox-debug +formulahendry.auto-rename-tag +formulahendry.code-runner +george-alisson.html-preview-vscode +gingerturtle.html-preview-pro +github.vscode-pull-request-github +huizhou.githd +jannek-aalto.shell-function-outline +jeff-hykin.better-perl-syntax +jock.svg +johnpapa.winteriscoming +jsynowiec.vscode-insertdatestring +lakshits11.monokai-pirokai +loczek.next-js-ts-snippets +mdickin.markdown-shortcuts +ms-azuretools.vscode-containers +ms-python.debugpy +ms-python.python +ms-python.vscode-pylance +ms-python.vscode-python-envs +ms-vscode-remote.remote-containers +ms-vscode.cpptools +ms-vscode.extension-test-runner +ms-vscode.js-debug-nightly +ms-vscode.live-server +ms-vscode.remote-explorer +ms-vscode.remote-server +richterger.perl +rogalmic.bash-debug +shakram02.bash-beautify +shd101wyy.markdown-preview-enhanced +sidthesloth.html5-boilerplate +solnurkarim.html-to-css-autocompletion +streetsidesoftware.code-spell-checker +streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries +sumneko.lua +techer.open-in-browser +theliraan.simpleaccents +torrentalle.perl-moose +tshino.kb-macro +undefined_publisher.perlcnf-extension +utgwkk.perl-rename-symbol +visualstudioexptteam.intellicode-api-usage-examples +visualstudioexptteam.vscodeintellicode +wbudic.perlcnf +wscats.cors-browser +yzhang.markdown-all-in-one -- 2.34.1