- install k3s
curl -sfL https://get.k3s.io | sh -- or
k3sup install --local --k3s-channel v1.33 --k3s-extra-args="--data-dir=/media/extra/k3s --kubelet-arg=root-dir=/media/extra/kubelet"
sudo cp /etc/rancher/k3s/k3s.yaml /home/user/kubeconfigsudo chown user:user /home/user/kubeconfig- install ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.13.0/deploy/static/provider/cloud/deploy.yaml
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 | |
| # Default settings | |
| DEFAULT_GPU_LAYERS=20 | |
| DEFAULT_CTX_SIZE=768 | |
| LLAMA_BIN="./llama.cpp/build/bin/llama-server" | |
| HOST="0.0.0.0" | |
| PORT="8832" | |
| # Predefined configs: "filename.gguf|gpu-layers|ctx-size" |
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
| find . -mindepth 1 -maxdepth 1 -type f -name "*.mp4" -print0 | shuf -z -n1 | xargs -r -0 -I XXX bash -c 'echo "XXX" ; mpv --autofit=1080x100% "XXX" ; mv -v "XXX" ./watched' |
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 | |
| # Config | |
| INDEX="arkime_sessions3-*" | |
| SIZE=1000 | |
| SCROLL_DURATION="1m" | |
| AUTH="--config /var/local/curlrc/.opensearch.primary.curlrc" | |
| BASE_URL="https://opensearch:9200" | |
| COLLISIONS_RAW="colliding_docs_raw.json" | |
| COLLISIONS_PRETTY="colliding_docs_pretty.json" |
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
| [Peer] | |
| AllowedIPs = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3 |
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
| expect -c ' | |
| spawn your_command | |
| sleep 30 | |
| send "\r" | |
| interact | |
| ' |
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
| scoop status | ForEach-Object { | |
| if ($_ -match '^(@{Name=)?(\S+?);?\s+(\S+)\s+(\S+)\s+(.*)') { | |
| $name = $matches[2] | |
| $installedVersion = $matches[3] | |
| $latestVersion = $matches[4] | |
| if ($installedVersion -ne $latestVersion) { | |
| try { | |
| scoop update $name | |
| } catch { | |
| Write-Host "Failed to update $name" -ForegroundColor Red |
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 python3 | |
| import os | |
| import sys | |
| import mmap | |
| import subprocess | |
| import time | |
| from multiprocessing import Pool | |
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
| num=0; for i in *; do mv "$i" "$(printf '%04d' $num).${i#*.}"; ((num++)); 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
| import hashlib | |
| import sys | |
| with open(sys.argv[1], 'rb', buffering=0) as f: | |
| print(hashlib.file_digest(f, 'shake_256').hexdigest(8)) |
NewerOlder