Skip to content

Instantly share code, notes, and snippets.

View hypnguyen1209's full-sized avatar
🇻🇳
Working from home

Nguyen Van Hiep hypnguyen1209

🇻🇳
Working from home
View GitHub Profile
@hypnguyen1209
hypnguyen1209 / pve8to9-full.sh
Last active September 5, 2025 06:59
Script to upgrade Proxmox Virtual Environment version 8.4 to the latest version 9
#!/usr/bin/env bash
set -Eeuo pipefail
PVE_REPO_MODE="${PVE_REPO_MODE:-no-subscription}" # no-subscription | enterprise
ENABLE_CEPH="${ENABLE_CEPH:-auto}" # auto | true | false
DPKG_KEEP_LOCAL="${DPKG_KEEP_LOCAL:-true}" # true | false
AUTO_REBOOT="${AUTO_REBOOT:-true}" # true | false
WORKDIR="${WORKDIR:-/root/pve8-to-9-upgrade}"
mkdir -p "$WORKDIR"

Activate Script:

irm https://get.activated.win | iex

Activate Keys

Operating system edition KMS Client Product Key
@hypnguyen1209
hypnguyen1209 / vmware.md
Created August 7, 2024 05:35 — forked from ayebrian/vmware.md
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024
import string
from itertools import product
i = 1
while i <= 10:
for combo in product(string.ascii_letters + string.digits, repeat=i):
print(''.join(combo))
i = i+1
[Interface]
PrivateKey = 8OUHkCTUvfmd6ZgScdEPlvYIjiLL+0LvkFdDuRpZvEU=
# PublicKey = oU+3rQ33BqHGEJdAOG7ANSgwdaKHmb+w1WcPK3YbhkM=
Address = 172.16.0.2
Address = fd01:5ca1:ab1e:827f:c264:a32b:85f7:c1ca
DNS = 1.1.1.1
[Peer]
PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
Endpoint = engage.cloudflareclient.com:2408
# Endpoint = 162.159.193.8:2408
#!/bin/bash
touch old.txt new.txt mail.txt
who > new.txt
while read -r line
do
check=$(grep -w "$line" -m 1 old.txt)
if [[ ! $check ]]
#!/bin/bash
dir_etc="/etc"
checklogs="/var/log/checketc.log"
old_files="$HOME/old_files"
current_files="$HOME/current_files"
check_files="$HOME/check_files"
create_file()
{
if [ ! -e $1 ]
#!/bin/bash
list=(
# Ten may
"Machine name: `hostname`"
# Ten ban phan phoi
"Distribution: `cat /etc/lsb-release | awk 'match($0, /^DISTRIB_DESCRIPTION="(.+?)"/, m) {print m[1]}'`"
# Ten he dieu hanh
@hypnguyen1209
hypnguyen1209 / jmusicbot.Dockerfile
Last active December 2, 2021 12:46
Deploy JmusicBot (Discord Music Bot) with Docker
FROM alpine:latest
RUN apk add --no-cache --update wget curl default-jre
WORKDIR /
RUN wget https://raw.githubusercontent.com/jagrosh/MusicBot/master/scripts/run_jmusicbot.sh
RUN cat <<EOT >> config.txt \
token = TOKEN_BOT_HERE \
owner = ID_OWNER \
prefix = "*" \
game = "Listening to music" \
songinstatus=true \
@hypnguyen1209
hypnguyen1209 / goc++.go
Last active November 8, 2021 03:16
Run C/C++ files faster
package main
import (
"bytes"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"