Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
SRC_DIR="./"
DEST_DIR="./bad_videos"
mkdir -p "$DEST_DIR"
for file in "$SRC_DIR"*.mp4; do
echo "Checking: $file"
@hunzo
hunzo / nvim.sh
Last active June 26, 2025 08:59
script install neovim
#!/bin/bash
NVIM_VERSION="v0.11.2"
NVIM_FILE_NAME="nvim-linux-x86_64"
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
@hunzo
hunzo / wmi-check.ps1
Created June 23, 2025 02:59
Check WMI remote
Get-WmiObject -Class Win32_OperatingSystem -ComputerName 192.168.1.1 -Credential (Get-Credential)
@hunzo
hunzo / enable-snmp.ps1
Last active June 18, 2025 03:44
enable-snmp by powershell script
# Install SNMP Feature
Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -IncludeManagementTools
# Setting SNMP Service Start Automatic
Set-Service -Name SNMP -StartupType Automatic
Set-Service -Name SNMPTRAP -StartupType Automatic
Start-Service -Name SNMP
Start-Service -Name SNMPTRAP
# Seting SNMP Community (ex. public)

ขั้นตอนการตั้งค่า Certificate Template สำหรับ 802.1X บน Windows Server (ฉบับสมบูรณ์)

เอกสารนี้สรุปขั้นตอนทั้งหมดสำหรับการสร้าง, ตั้งค่า, และแจกจ่าย Certificate สำหรับการยืนยันตัวตนผ่านเครือข่ายด้วยมาตรฐาน 802.1X โดยใช้ Active Directory Certificate Services (AD CS) บน Windows Server


📋 1. สิ่งที่ต้องมีก่อน (Prerequisites)

ก่อนเริ่มต้น ต้องแน่ใจว่าระบบของคุณมีองค์ประกอบต่อไปนี้ครบถ้วน:

  1. Active Directory Domain Services (AD DS): ติดตั้งและทำงานได้อย่างสมบูรณ์
@hunzo
hunzo / init.sh
Last active June 27, 2025 06:15
my install update 20250528
sudo apt install -y \
tree \
unzip \
curl \
git \
snmp \
snmpd \
libsnmp-dev \
python3-pip \
python3-venv \
@hunzo
hunzo / machine-id.sh
Created May 28, 2025 04:14
vmware esxi template for linux
sudo rm /etc/machine-id
sudo touch /etc/machine-id
sudo chmod 644 /etc/machine-id
@hunzo
hunzo / allow-rdp.ps1
Last active May 22, 2025 02:34
RDP powershell
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name "UserAuthentication" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
New-NetFirewallRule `
-DisplayName "Allow RDP from All Networks (3389)" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 3389 `
-Action Allow `
-Profile Domain,Private,Public `
@hunzo
hunzo / decK.sh
Last active May 6, 2025 08:21
backup and restore kong
#/bin/bash
# Install decK
curl -sL https://github.com/kong/deck/releases/download/v1.47.0/deck_1.47.0_linux_amd64.tar.gz -o deck.tar.gz
tar -xf deck.tar.gz -C /tmp
sudo cp /tmp/deck /usr/local/bin/
export KONG_ADMIN_URL=http://localhost:8001
# backup
# deck gateway dump -o backup-file.yaml
@hunzo
hunzo / .env
Last active May 6, 2025 08:27
simple kong-gateway
POSTGRES_USER=kong
POSTGRES_DB=kong
POSTGRES_PASSWORD=postgres_password
KONG_PASSWORD=kong_password
KONG_LICENSE_DATA=
TZ=Asia/Bangkok