Skip to content

Instantly share code, notes, and snippets.

View Kaylebor's full-sized avatar

Ender Kaylebor

View GitHub Profile
@Kaylebor
Kaylebor / get-synthetic-models.bash
Created March 12, 2026 15:34
Fetches Synthetic hosted models and transforms them to either pi.dev or OpenCode configuration formats; skips proxied models
#!/bin/bash
# Check if SYNTHETIC_API_KEY is set
if [[ -z "$SYNTHETIC_API_KEY" ]]; then
echo "Error: SYNTHETIC_API_KEY environment variable is not set" >&2
exit 1
fi
# Default option is "pi" (case-insensitive)
OPTION="${1:-pi}"
@Kaylebor
Kaylebor / sunshine_screen.bash
Created March 9, 2026 15:10
Script to simplify display switching in KDE with Sunshine remote
#!/usr/bin/env bash
LOG_FILE="$HOME/.cache/sunshine_screen.log"
STATE_FILE="$HOME/.cache/sunshine_state"
mkdir -p "$(dirname "$STATE_FILE")"
log() { echo "$(date '+%Y-%m-%d %H:%M:%S') - $*" >> "$LOG_FILE"; }
# Dependency check
if ! command -v kscreen-doctor &>/dev/null || ! command -v jq &>/dev/null; then
@Kaylebor
Kaylebor / tpm-ssh-setup.md
Last active March 4, 2026 10:34
TPM2-Based SSH Key Setup with Automatic Unlock

TPM2-Based SSH Key Setup with Automatic Unlock

Complete guide for storing SSH keys in a TPM2 module with automatic loading via systemd and KWallet integration on KDE Plasma.

Overview

This setup provides:

  • Hardware-backed SSH keys stored in TPM2 (can't be extracted)
  • Automatic unlock at KDE login using KWallet
  • PIN protection (not passwordless, but PIN cached per session)
@Kaylebor
Kaylebor / repair-wine-url-handlers.sh
Created October 8, 2025 16:45
Repairs Wine URL handlers to ensure that Windows programs use the system browser to open URLs
#!/usr/bin/env bash
set -Eeuo pipefail
usage() {
cat <<USAGE
Usage: $(basename "$0") [--force] [--schemes list] [--filetypes list]
Ensures selected Wine URL protocol and file associations use winebrowser.
Options:
@Kaylebor
Kaylebor / fl-studio-webview2-install.sh
Created September 26, 2025 10:26
Install FL Studio with working WebViews
#!/usr/bin/env bash
set -Eeuo pipefail
# --- FL Studio + WebView2 Installation Script ---
# Complete setup: WebView2 Runtime -> Environment -> FL Studio
# --- Config ----------------------------------------------------------------
WINEPREFIX="${WINEPREFIX:-$HOME/.wine}"
WINEBIN="${WINEBIN:-wine}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@Kaylebor
Kaylebor / webview2-env-setup.sh
Created September 26, 2025 10:22
Fix environment to ensure FL Studio can use installed Microsoft Edge WebView2 correctly
#!/usr/bin/env bash
set -Eeuo pipefail
# --- WebView2 Environment Setup Script ---
# Sets up the minimal working WebView2 configuration for FL Studio
# --- Config ----------------------------------------------------------------
WINEPREFIX="${WINEPREFIX:-$HOME/.wine}"
WINEBIN="${WINEBIN:-wine}"
FL_EXE_NAME="FL64.exe"
@Kaylebor
Kaylebor / deepfilternet-build.sh
Last active January 4, 2025 19:38
Manually build and install DeepFilterNet ladspa for EasyEffects (non-Flatpak, may work with Flatpak with the right permissions)
git clone git@github.com:Rikorose/DeepFilterNet.git
cd DeepFilterNet
cargo build --release -p deep-filter-ladspa
sudo cp target/release/libdeep_filter_ladspa.so /usr/lib64/ladspa/
@Kaylebor
Kaylebor / sh
Last active June 7, 2021 12:36
Remove Mobvoi apps (bloat) from TicWatch using GNU Parallels
parallel adb shell pm uninstall -k --user 0 ::: $(adb shell pm list packages mobvoi | cut -d: -f2)

Keybase proof

I hereby claim:

  • I am kaylebor on github.
  • I am kayleb0r (https://keybase.io/kayleb0r) on keybase.
  • I have a public key ASBTg5kksTEo9YCR2jxPPVzp2DibDvtEnshJGP71LzjrDAo

To claim this, I am signing this object:

%% @doc
%% USAGE:
%% In the $HOME folder, create a file called .erlang
%% On that file, write the following line:
%%
%% code:load_abs("/path/to/user_default").
%%
%% Note that user_default must have been compiled
%% (there must be a user_default.beam file in the folder)
%%