Skip to content

Instantly share code, notes, and snippets.

View hayd1n's full-sized avatar
๐Ÿ‘€

Hayden Chang hayd1n

๐Ÿ‘€
View GitHub Profile
@hayd1n
hayd1n / affine-patcher.mjs
Last active November 5, 2025 15:10
AFFiNE Self-Hosted Patcher
// Import required modules using ESM syntax
import fs from "fs/promises"; // Use the promises-based API
import path from "path";
import process from "process"; // Required for argv and exit
// --- Configuration ---
// Get the filename from the command line arguments
// process.argv[0] is 'node'
// process.argv[1] is the script file (e.g., 'replace.js')
@hayd1n
hayd1n / setup-ssh-sync.sh
Last active October 21, 2025 09:34
๐Ÿ” Auto-installer for ssh-key-sync with systemd timer on Linux. Automatically detects OS and architecture, downloads the correct binary, and sets up periodic GitHub SSH key syncing.
#!/bin/bash
set -e
# === CONFIGURATION ===
VERSION="1.7.3"
USER_NAME="$(whoami)"
GITHUB_USER="hayd1n" # <--- Your GitHub username here
# === Detect OS ===
@hayd1n
hayd1n / cloudSettings
Last active July 11, 2021 05:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-11T05:06:13.489Z","extensionVersion":"v3.4.3"}