Skip to content

Instantly share code, notes, and snippets.

View techfish-11's full-sized avatar

techfish techfish-11

View GitHub Profile
@techfish-11
techfish-11 / dhcp-static.sh
Created December 19, 2025 10:26
DHCPでもらっていたIPをそのまま固定するシェルスクリプト
#!/bin/bash
set -e
echo "[*] Detecting interface (IPv4 default)..."
IFACE=$(ip -4 route show default | awk '{print $5}' | head -n1)
echo "[*] Detecting current IPv4 (non-secondary)..."
ADDR=$(ip -4 addr show "$IFACE" \
| awk '/inet / && $0 !~ /secondary/ {print $2}' \
| head -n1)
@techfish-11
techfish-11 / install.sh
Last active September 7, 2025 18:54
俺用WordPressインストールスクリプト
#!/bin/bash
# WordPress日本語版 + Nginx + MySQL/MariaDBをUbuntu Serverにプロダクションレディでセットアップするスクリプト
set -e
apt update && apt install curl
# --- 設定値(必要に応じて編集) ---
DB_NAME="wordpress"
DB_USER="wpuser"