Skip to content

Instantly share code, notes, and snippets.

View NotYusta's full-sized avatar

Yusta NotYusta

View GitHub Profile
@NotYusta
NotYusta / install_swap.sh
Last active September 11, 2026 04:23
Install Swap 4G
#!/bin/sh
set -e
SWAPFILE="/swapfile"
if [ -f "$SWAPFILE" ]; then
echo "Swapfile already exists, skipping."
exit 0
fi
@NotYusta
NotYusta / benchmark_geekbench_loop.sh
Created June 29, 2026 16:18
benchmark_geekbench_loop
#!/bin/bash
set -uo pipefail
RUNS=8
OUTPUT_DIR="results"
mkdir -p "$OUTPUT_DIR"
for i in $(seq 1 $RUNS); do
@NotYusta
NotYusta / hv_controller_install.sh
Last active October 5, 2026 04:25
Hypervisor Controller Installation Script
#!/bin/bash
set -e
SERVICE_NAME="hv-controller"
DOWNLOAD_URL="http://s3.raznar.net/hv-controller/hv-controller_linux_amd64"
INSTALL_PATH="/usr/bin/$SERVICE_NAME"
TEMP_PATH="/tmp/${SERVICE_NAME}.new"
WORKDIR="/etc/$SERVICE_NAME"
SERVICE_FILE="/etc/systemd/system/$SERVICE_NAME.service"
@NotYusta
NotYusta / install_nginx.sh
Created January 21, 2026 13:58
Auto installer nginx open source debian.
#!/bin/sh
# Update system and install dependencies
sudo apt update && \
sudo apt install -y curl gnupg2 ca-certificates lsb-release debian-archive-keyring
# Add NGINX official signing key
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
@NotYusta
NotYusta / update_cadvisor.sh
Last active December 6, 2025 14:15
update_cadvisor
#!/bin/sh
set -e
# Disable and stop current cadvisor
systemctl disable --now cadvisor
# Download cadvisor v0.54.1 binary
curl -sLo /usr/local/bin/cadvisor https://github.com/google/cadvisor/releases/download/v0.54.1/cadvisor-v0.54.1-linux-amd64
# Make it executable
chmod +x /usr/local/bin/cadvisor
@NotYusta
NotYusta / install_game_exporters.sh
Last active December 6, 2025 14:00
install_game_exporters.sh
#!/bin/sh
set -e
TMP_DIR="/tmp/exporter_installers"
mkdir -p "$TMP_DIR"
NODE_EXPORTER_URL="https://gist.githubusercontent.com/NotYusta/7f0121db2fb01c60edb3d64ad1b9cd27/raw/3be376455f4ffce7e5e8018cd32254cef9595ff0/install_node_exporter.sh"
CADVISOR_URL="https://gist.githubusercontent.com/NotYusta/412c55b1d712bd717ccc310c7c48328b/raw/3300f55c6284be7d743a2b516c6c246f95cebeca/install_cadvisor.sh"
download_and_run() {
@NotYusta
NotYusta / install_bare_metal_exporters.sh
Last active December 5, 2025 06:43
install_bare_metal_exporters
#!/bin/sh
set -e
TMP_DIR="/tmp/exporter_installers"
mkdir -p "$TMP_DIR"
NODE_EXPORTER_URL="https://gist.githubusercontent.com/NotYusta/7f0121db2fb01c60edb3d64ad1b9cd27/raw/3be376455f4ffce7e5e8018cd32254cef9595ff0/install_node_exporter.sh"
SMARTCTL_URL="https://gist.githubusercontent.com/NotYusta/5ab4a72e28957575b4ed75a17f111699/raw/cf3bd3b0fc5d89c73a2e040e99afed4866a0ebc1/install_smartctl.sh"
download_and_run() {
@NotYusta
NotYusta / hostname.sh
Last active July 11, 2025 07:29
Set Hostname
#!/bin/bash
# Ensure script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "❌ Please run this script as root (sudo)."
exit 1
fi
# Check for hostname argument
if [ -z "$1" ]; then
@NotYusta
NotYusta / generate_wings_config.sh
Last active July 11, 2025 08:05
Generate Wings Config
#!/bin/bash
# Example usage:
# ./generate_wings_config.sh \
# --uuid "1046d1d1-b8ef-4771-82b1-2b5946d33397" \ # Node UUID from panel
# --token_id "iAcosCn1KCAgVjVO" \ # Token ID from panel
# --token "FanPzLCptUxkGow3vi7Z" \ # Token secret from panel
# --ssl_cert "/etc/letsencrypt/live/pterodactyl.file.properties/fullchain.pem" \ # Path to SSL cert
# --ssl_key "/etc/letsencrypt/live/pterodactyl.file.properties/privkey.pem" \ # Path to SSL key
# --remote_url "https://pterodactyl.file.properties" \ # Panel URL
# --pid_limit 512 # PID limit (0 = unlimited)
@NotYusta
NotYusta / minio_download.sh
Last active July 10, 2025 08:34
MinIO Download
#!/bin/bash
# Usage:
# ./minio_download.sh <ACCESS_KEY> <SECRET_KEY> <BUCKET> <OBJECT_PATH> <DEST_FILE> <MINIO_URL>
# Or set via env vars:
# MINIO_ACCESS_KEY, MINIO_SECRET_KEY, MINIO_BUCKET, MINIO_OBJECT, MINIO_DEST, MINIO_URL
ACCESS_KEY="${1:-$MINIO_ACCESS_KEY}"
SECRET_KEY="${2:-$MINIO_SECRET_KEY}"
BUCKET="${3:-$MINIO_BUCKET}"