The entire script is generated with gpt-4-turbo on 2024-April-28; This script won't work without https://github.com/BYVoid/OpenCC
Usage:
./convert2zhtw.sh .
or append suffix,
| // gist id placeholder |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| d="${HF_HUB_CACHE:-${HF_HOME:-$HOME/.cache/huggingface}/hub}" | |
| shopt -s nullglob | |
| m=("$d"/models--*); ((${#m[@]})) || { echo "No models"; exit 0; } | |
| for i in "${!m[@]}"; do n="${m[i]##*/models--}"; printf '%d) %s\n' "$((i+1))" "${n//--//}"; done | |
| read -r -p "Delete #: " -a ids </dev/tty; ((${#ids[@]})) || exit 0 | |
| x=() | |
| for i in "${ids[@]}"; do | |
| [[ "$i" =~ ^[0-9]+$ ]] || exit 1 |
| #!/usr/bin/env bash | |
| HAS_FD=0 | |
| HAS_RG=0 | |
| command -v fd >/dev/null 2>&1 && HAS_FD=1 | |
| command -v rg >/dev/null 2>&1 && HAS_RG=1 | |
| show() { | |
| printf '\n[%s] %s\n' "$1" "$2" | |
| } |
The entire script is generated with gpt-4-turbo on 2024-April-28; This script won't work without https://github.com/BYVoid/OpenCC
Usage:
./convert2zhtw.sh .
or append suffix,
References:
https://qiita.com/que9/items/28a9f7978fd34a620193
https://github.com/pyenv/pyenv/issues/1066#issuecomment-630939869
https://github.com/pyenv/pyenv/issues/2042#issuecomment-1131463276
https://stackoverflow.com/questions/51551557/pyenv-build-failed-installing-python-on-macos
The error:
| #!/usr/bin/env bash | |
| # NOTICE: This is terribly written and only tested on EC2 | |
| # Make sure the firewall and network-related policies are properly set between the hosts | |
| # Comments and feedback are welcome :) | |
| # Verified with following version combo: | |
| # rke2-selinux-0.9-1.el8.noarch | |
| # libselinux-2.9-5.el8.x86_64 | |
| # selinux-policy-3.14.3-68.el8.noarch | |
| # container-selinux-2.170.0-1.module_el8.6.0+954+963caf36.noarch |
Hardward: x86_64, 2 core CPU, 4GB ram OS: Ubuntu Linux 20.04 LTS
The idea is to set up a file server for sharing files in between small group of people.
The server is behind a router from ISP, so I had to configure the NAT Port-Forwarding to the local IP. And since there is no static IP, I also had to use script like ddns-updater.
| # This an example to create Disk Pressure on Kubernetes cluster by overwriting claim volume. | |
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: longhorn-pvc-33g | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| storageClassName: longhorn |