Skip to content

Instantly share code, notes, and snippets.

View fadlee's full-sized avatar

Fadlul Alim fadlee

  • Indonesia
  • 12:51 (UTC +07:00)
View GitHub Profile
@fadlee
fadlee / setup-convex-auth-env.js
Last active September 4, 2025 15:25
Configure private and public key for Convex Auth, submit directly to Convex backend configured in .env.local
// run this using: curl -s https://rawurl... | node
import { generateKeyPair, createPublicKey } from 'crypto';
import { readFile } from 'fs/promises';
import { promisify } from 'util';
import path from 'path';
import { fileURLToPath } from 'url';
import https from 'https';
import http from 'http';
// Get the directory of the current module
@fadlee
fadlee / switch-wifi.sh
Created April 16, 2026 02:59
Script to switch server wifi safely
#!/usr/bin/env bash
set -Eeuo pipefail
INTERFACE="${INTERFACE:-wlp1s0}"
TARGET_SSID="${TARGET_SSID:-CHANGE_ME_SSID}"
TARGET_PASSWORD="${TARGET_PASSWORD:-CHANGE_ME_PASSWORD}"
TARGET_BSSID="${TARGET_BSSID:-}"
ROLLBACK_DELAY="${ROLLBACK_DELAY:-45}"
VERIFY_SECONDS="${VERIFY_SECONDS:-25}"
PING_HOST="${PING_HOST:-1.1.1.1}"