This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # Dependency check | |
| RG_VERSION="$(rg --version | head -n1 | cut -d" " -f2)" | |
| version_ge() | |
| { | |
| printf '%s\n%s\n' "$2" "$1" | sort -V -C | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| | |
| if ! [[ $(command -v rg) > /dev/null ]]; then | |
| echo "You need to install Ripgrep" | |
| echo "https://github.com/BurntSushi/ripgrep" | |
| exit 1 | |
| fi | |
| | |
| while getopts "t:" OPTION; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| display_center(){ | |
| columns="$(tput cols)" | |
| while IFS= read -r line; do | |
| printf "%*s\n" $(( (${#line} + columns) / 2)) "$line" | |
| done < "$1" | |
| } | |
| eval $(curl -s "https://www.ercot.com/content/cdr/html/real_time_system_conditions.html" | pup 'tbody json{}' | jq -r '.[] | {CAPACITY:.children[6].children[1].text, DEMAND:.children[5].children[1].text} | to_entries|map("\(.key)=\(.value|tostring)")|.[]') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| shopt -s extglob | |
| # generated from util-linux source: libmount/src/utils.c | |
| declare -A pseudofs_types=([anon_inodefs]=1 | |
| [autofs]=1 | |
| [bdev]=1 | |
| [bpf]=1 | |
| [binfmt_misc]=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # uses https://github.com/z3bra/wendy | |
| # replace below value with path of your chia '-d' value | |
| CHIA_D="/many/t7" | |
| # replace below value with path of HDD | |
| FINAL="/mnt/plots" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| BUFFER="/mnt/p50" | |
| # FindMounts | |
| MOUNT_LIST="/tmp/$(basename "$0")-mounts.$$.list" | |
| find /mnt -type d -name 'plots*' > "$MOUNT_LIST" | |
| # FindBusy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| source /home/your/path/to/chia-blockchain/activate | |
| STR=$(chia farm summary | head -8) | |
| FARM=$(chia farm summary | head -8 | sed 's/ /_/g; s/:_/=/g') #jq -Rs '{chia:split("\n")|map(split(": ")|{(.[0]):.[1]}?)}' | |
| ACTIVE=$(pgrep -fa 'chia plots create' | wc -l) | |
| printem() { | |
| echo "Active_Plots=$ACTIVE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| | |
| FIO=$(mktemp /tmp/fioXXXXXXXX.fio) | |
| TARGET=$1 | |
| | |
| FIO_TMP=$(cat <<- EOF | |
| [global] | |
| bs=128K | |
| iodepth=256 | |
| direct=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| PIDARRAY=$(pgrep -fa 'chia plots create' | awk '{print $1}') | |
| printPids() { | |
| for CHP in $PIDARRAY; do | |
| CH_PID=$(("$CHP" + 1)) | |
| journalctl _PID=$CH_PID --no-page --no-hostname -o cat | tac | grep -m1 -o "Starting phase .*" | cut -f1 -d/ | |
| done | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #set -x | |
| PIDPROCS=$(pgrep -fa 'chia plots create') | |
| if [[ -z ${PIDPROCS} ]]; then | |
| PIDARRAY="" | |
| PIDCT=0 |