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
| # If you have several SSH keys in `~/.ssh/`, and when you try to SSH into a machine where you don't have a key, but need a password, you'll get a "Too many authentication failures" because SSH tried all of your keys, and the remote system kicked you off. | |
| # | |
| # So this augments `ssh` with `sshp` where it will turn off SSH key auth and instead prompt for a password. | |
| # | |
| # Add this line to your `~/.bash_aliases` then use it just like the `ssh` command, except `sshp`. | |
| alias sshp='ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password -o IdentitiesOnly=yes' |
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 | |
| # Get a quick look at manufacturer and model, and CPU string and RAM of the current machine | |
| MANUFACTURER=`dmidecode -t system | grep Manufacturer | head -n1 | cut -d':' -f2 | xargs` | |
| MODEL=`dmidecode -t system | grep Version | head -n1 | cut -d':' -f2 | xargs` | |
| CPU=`dmidecode -t processor | grep Version | head -n1 | cut -d':' -f2 | xargs` | |
| RAM=`free -h | awk '/Mem:/ {print $2}'` | |
| echo "Manufacturer..: $MANUFACTURER" |
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 | |
| # Install or update the official Seafile desktop sync client AppImage for the | |
| # current user on Ubuntu 24.04 x86_64. | |
| # | |
| # The AppImage is downloaded from the official haiwen/seafile-client GitHub | |
| # release and verified against GitHub's SHA-256 release-asset digest. | |
| set -Eeuo pipefail | |
| umask 022 |
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 -euo pipefail | |
| usage() { | |
| cat <<'EOF' | |
| Usage: | |
| create-scoped-key.sh PLATFORM PURPOSE PRINCIPAL HOST [OPTIONS] | |
| Creates an Ed25519 SSH key using this naming convention: |
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 -Eeuo pipefail | |
| IFS=$'\n\t' | |
| ############################################################################### | |
| # gitrunner-setup.sh | |
| # | |
| # Build, inspect, and remove GitHub self-hosted runner instances on Ubuntu 24.04. | |
| # Multiple GitHub organizations/repositories may share the same physical host. | |
| # |
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 -euo pipefail | |
| # Colored, prefixed logging | |
| COLOR_RESET="\033[0m" | |
| COLOR_CYAN="\033[1;36m" | |
| COLOR_RED="\033[1;31m" | |
| COLOR_GREEN="\033[1;32m" | |
| COLOR_AMBER="\033[0;33m" |
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 -euo pipefail | |
| # compose-upgrade.sh | |
| # Usage: compose-upgrade.sh [--help] [--service-name NAME] [--service-path PATH] [--log-dir PATH] | |
| # | |
| # Runs: docker compose pull && docker compose up -d --remove-orphans | |
| # Prints progress with [+]/[-] markers, logs to file, and exits nonzero on failure. | |
| show_help() { |
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 -euo pipefail | |
| # ========================= | |
| # service-generator.sh | |
| # ------------------------- | |
| # Create a systemd-managed docker-compose service skeleton: | |
| # - Unprivileged user: service-runner (home: /opt/${ServiceName}) | |
| # - Adds service-runner to docker group | |
| # - Systemd unit: /etc/systemd/system/${ServiceName}.service |
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
| # Install-LlmClis.ps1 | |
| Set-StrictMode -Version Latest | |
| $ErrorActionPreference = 'Stop' | |
| # --- 0) Require Administrator --- | |
| $IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent() | |
| ).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
| if (-not $IsAdmin) { throw "This script must be run from an Administrator PowerShell." } | |
| # --- 1) Ensure winget --- |
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 -euo pipefail | |
| # --- prereqs --- | |
| sudo apt-get update -y | |
| sudo apt-get install -y --no-install-recommends ca-certificates curl git build-essential unzip | |
| mkdir -p "$HOME/.local/bin" | |
| grep -q 'export PATH="$HOME/.local/bin:$PATH"' "$HOME/.bashrc" \ | |
| || echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.bashrc" |
NewerOlder