Skip to content

Instantly share code, notes, and snippets.

View Alex4386's full-sized avatar
๐ŸŽ“
์กธ์—…์‹œ์ผœ์ค˜

Sanghee Park Alex4386

๐ŸŽ“
์กธ์—…์‹œ์ผœ์ค˜
View GitHub Profile
@Alex4386
Alex4386 / envoy-setup.sh
Last active March 5, 2026 08:57
Envoy Setup
#!/bin/bash
# 1. Create the configuration directory
if [ ! -d "/etc/envoy" ]; then
echo "Creating /etc/envoy directory..."
sudo mkdir -p /etc/envoy
sudo chmod 755 /etc/envoy
fi
# 2. Create system user for Envoy (if it doesn't exist)
@Alex4386
Alex4386 / freeze-netplan.sh
Created February 27, 2026 09:46
Freeze Ubuntu Netplan configuration by cloud-init
#!/bin/bash
echo "network: {config: disabled}" | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
@Alex4386
Alex4386 / agent-merger.sh
Created February 24, 2026 06:57
Codex AGENTS.md builder for SuperClaude migration
#!/usr/bin/env sh
set -eu
SOURCE_DIR="$HOME/.codex/agents"
OUTPUT_FILE="AGENTS.md"
# Verify source directory exists
if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: Source directory '$SOURCE_DIR' does not exist." >&2
@Alex4386
Alex4386 / allow-mixed-content.md
Last active March 5, 2026 09:30
Allow Mixed Content

Allow Mixed Content

Sometimes there are legitimate cases that HTTPS pages to access HTTP contents (some hosted dashboards hosted on HTTPS to access local HTTP APIs)
For these cases, You can allow Browser to fetch HTTP contents.

Chrome

  1. Open Site Menu (toggle button next to address bar)
    image

  2. Scroll down to Insecure Content, Press Allow.

@Alex4386
Alex4386 / flatten-iso-proxmox.sh
Created January 5, 2026 05:02
flatten iso for symlinks
#!/bin/bash
# ================= CONFIGURATION =================
SOURCE_DIR="/mnt/pool_name/dataset_name/iso"
PROXMOX_DIR="${SOURCE_DIR}/template/iso"
# true = Always use "Folder-Filename.iso"
# false = Only use prefix if filenames collide
APPEND_DIRNAME_ALWAYS=false
# =================================================
@Alex4386
Alex4386 / mirrorlist
Last active January 6, 2026 05:24
Don't use the ROKFOSS for ArchLinux >:(
## South Korea
Server = http://ftp.kaist.ac.kr/ArchLinux/$repo/os/$arch
Server = https://mirror.yuki.net.uk/ArchLinux/$repo/os/$arch
@Alex4386
Alex4386 / 99-sysctl-same-lan-fix-arp.conf
Created October 23, 2025 09:16
Fix the different NIC responding to other NIC's network if both of them are on the same subnet
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.all.rp_filter=2
@Alex4386
Alex4386 / pcgoboom.cmd
Created August 7, 2025 15:01
PC go boom
@echo off
:: Self-elevate using PowerShell if not running as admin
net session >nul 2>&1
if %errorlevel% neq 0 (
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
:: Create a file (not a directory) at the specified system path
copy /y nul "%SystemRoot%\System32\config\OSDATA" >nul 2>&1
@Alex4386
Alex4386 / jenkins-agent.ecosystem.config.js
Last active May 7, 2025 10:16
PM2 ecosystem.config.js for Jenkins Agent
try {
require('dotenv').config();
} catch(e) {
console.error('dotenv not found');
process.exit(1);
}
const os = require('os');
const path = require('path');
@Alex4386
Alex4386 / stat-pkg.sh
Last active February 24, 2025 09:30
Shell script for downloading static binaries
#!/bin/bash
# Base URL for the repository
BASE_URL="https://github.com/polaco1782/linux-static-binaries/raw/refs/heads/master"
# Check if ~/.local/bin is in the PATH environment variable
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
echo "Error: ~/.local/bin is not in your PATH. Please add it by running:"
echo "export PATH=\$HOME/.local/bin:\$PATH"
exit 1