Skip to content

Instantly share code, notes, and snippets.

@hunzo
hunzo / create_user_prompt.sh
Created April 9, 2026 04:04
create user with temp password and force change password next login
#!/usr/bin/env bash
set -euo pipefail
if [[ "${EUID}" -ne 0 ]]; then
echo "Please run as root or use sudo."
exit 1
fi
# 🔹 Prompt input
read -rp "Enter username: " USERNAME
@hunzo
hunzo / ollama_opencode.md
Last active April 8, 2026 04:25
config olllama on docker and opencode

Config Ollam + Opencode

Config Opencode

  • .config/opencode/config.json
{
    "$schema": "https://opencode.ai/config.json",
    "default_agent": "build",
@hunzo
hunzo / minio-config.sh
Created April 5, 2026 11:33
my minio config script
#!/usr/bin/env bash
set -e
# =========================
# Prompt Input
# =========================
read -p "MinIO Endpoint (default: http://localhost:9000): " MINIO_ENDPOINT
MINIO_ENDPOINT=${MINIO_ENDPOINT:-http://localhost:9000}
@hunzo
hunzo / .luarc.json
Last active April 3, 2026 08:32
nvim 0.12 v2
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime": {
"version": "LuaJIT"
},
"diagnostics": {
"globals": ["vim"]
},
"workspace": {
"library": ["$VIMRUNTIME/lua", "$VIMRUNTIME/lua/vim/lsp"],
@hunzo
hunzo / init-nolsp.lua
Last active April 2, 2026 16:59
simple nvim 0.12 config
local opt = vim.opt
local g = vim.g
local keymap = vim.keymap
-- Basic editor settings
opt.expandtab = true -- Use spaces instead of tabs
opt.tabstop = 2 -- Number of spaces that a <Tab> in the file counts for
opt.softtabstop = 2 -- Number of spaces that a <Tab> counts for while performing editing operations
opt.shiftwidth = 2 -- Size of an indent
opt.relativenumber = true -- Show relative line numbers

Arch mirror

sudo pacman -S reflector

sudo reflector \
  --country Thailand \
  --age 24 \
  --protocol https \
 --sort rate \
@hunzo
hunzo / compose.yaml
Last active March 10, 2026 03:00
simple nginx
services:
nginx:
image: nginx
ports:
- "80:80"
command:
- /bin/sh
- -c
- |
cat > /etc/nginx/conf.d/default.conf <<'EOF'
@hunzo
hunzo / readme.md
Created February 6, 2026 06:20
Mikrotik config example

Example Mikrotik configuration

  • create select WAN interface ex ether1
  • create bridge
  • ex. LAN ip 192.168.88.1, WAN dhcp client, Lan ether2,ether3,ether4

Plug WAN to ether1

Add ip adddress to bridge interface

@hunzo
hunzo / compose.yaml
Created January 20, 2026 02:35
cloudflare tunnel example
services:
cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared
restart: unless-stopped
command: tunnel --no-autoupdate run
environment:
- TUNNEL_TOKEN=YOUR_CLOUDFLARE_TOKEN
network_mode: host
@hunzo
hunzo / README.md
Last active January 21, 2026 04:24
Create Win11 Golden Images

Create windows11-template golden images

Disable Bitlocker

manage-bde -status C:
manage-bde -off C:
  • Check Bitlocker Status Conversion Status: Fully Decrypted