Skip to content

Instantly share code, notes, and snippets.

@psquire
psquire / vps-fix.sh
Created May 7, 2026 14:15
Brandon League VPS one-shot fix
#!/bin/bash
# Brandon League VPS — one-shot fix after run-bp.sh became tracked in repo.
# Removes the local untracked wrapper, pulls the new tracked version, runs
# fetch.py to generate today's snapshot, then runs the new wrapper.
set -e
echo "==> Updating VPS app dir..."
sudo -u bpfetch bash <<'EOF'
set -e
@psquire
psquire / vps-setup-3.sh
Created May 7, 2026 13:56
Brandon League VPS Phase 3
#!/bin/bash
# Brandon League VPS — Phase 3
# Installs .env (scp'd to /tmp/env), creates BP-fetch wrapper script,
# sets up cron, runs a test fetch + GitHub push to verify the loop.
set -e
APP_DIR="/home/bpfetch/brandon-league"
ENV_SRC="/tmp/env"
ENV_DST="$APP_DIR/.env"
@psquire
psquire / vps-setup-2.sh
Created May 7, 2026 13:50
Brandon League VPS Phase 2
#!/bin/bash
# Brandon League VPS — Phase 2
# Clones repo via deploy key, sets up Python venv, installs deps, creates
# .env template. After this completes, user scp's their local .env over,
# then runs Phase 3.
set -e
REPO_URL="git@github.com:psquire/brandon-league.git"
APP_DIR="/home/bpfetch/brandon-league"
@psquire
psquire / vps-setup.sh
Last active May 7, 2026 13:40
Brandon League VPS setup
#!/bin/bash
# Brandon League VPS — Phase 1 setup
# Installs system deps, creates a non-root user, generates SSH deploy key,
# uploads the public key to a paste service so it's copyable without
# fighting Hetzner's web console clipboard.
set -e
echo "==> Updating apt + installing system packages..."
apt-get update -qq
@psquire
psquire / vps_setup_phase1.sh
Created May 7, 2026 13:18
Brandon League VPS Phase 1 setup
#!/bin/bash
# Brandon League VPS — Phase 1 setup
# Installs system deps, creates a non-root user, generates SSH deploy key.
# Run once on a fresh Hetzner Ubuntu 24.04 VPS as root.
set -e
echo "==> Updating apt + installing system packages..."
apt-get update -qq
apt-get install -y -qq \