Skip to content

Instantly share code, notes, and snippets.

View teebow1e's full-sized avatar
💖
learning something..

Trung Tran teebow1e

💖
learning something..
View GitHub Profile
@teebow1e
teebow1e / script.sh
Last active December 30, 2025 18:01
reset cloned VMs
#!/bin/bash
# Usage: curl -sSL https://a.xn--c-kia488t.vn/clone | sudo bash -s -- pc1
if [ "$EUID" -ne 0 ]; then
echo "Please run as root (e.g., sudo bash script.sh)"
exit 1
fi
NEW_HOSTNAME=$1
@teebow1e
teebow1e / a.sh
Created December 25, 2025 17:14
Install HUST thesis LaTeX deps
tlmgr install koma-script vntex geometry tabularx graphics fancybox was amscls amsmath amsfonts psnfss tools enumitem subfiles import titlesec chngcntr pdflscape afterpage algorithm2e ifoddpage relsize capt-of multirow fancyhdr appendix xcolor listings caption float booktabs subcaption xurl url glossaries glossaries-extra xkeyval mfirstuc xfor datatool tracklang supertabular setspace parskip blindtext biblatex biber hyperref oberdiek logreq etoolbox graphics-cfg graphics-def iftex
@teebow1e
teebow1e / install.sh
Created September 6, 2025 21:46
Install EricZimmerman tools on Linux
#!/bin/bash
declare -A TOOLS=(
["EvtxECmd"]=true
["AmcacheParser"]=true
["AppCompatCacheParser"]=true
["JLECmd"]=true
["LECmd"]=true
["MFTECmd"]=true
["PECmd"]=true
@teebow1e
teebow1e / mirror-repo.sh
Created August 3, 2025 18:56
Mirror any repo into a private repository on your GitHub account
#!/bin/bash
#===============================================================================
# mirror-repo.sh
#
# Clones a source repository and mirrors it to a new private repository on
# your GitHub account.
#
# Usage:
# ./mirror-repo.sh <source_repository_url>
## install uv on OS
curl -LsSf https://astral.sh/uv/install.sh | sh
## create new project
uv init myproj
## install packages
uv add django requests "pandas>=2.3"
## remove package
@teebow1e
teebow1e / ghcr.md
Last active November 1, 2025 10:11 — forked from yokawasa/ghcr.md
[Selfhost] ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

  1. ghcr login test
@teebow1e
teebow1e / ccf.md
Last active May 30, 2025 17:49 — forked from Bara/ccf.md
[Selfhost] Caddy with Cloudflare Proxy

Create API Key on Github

  • My Profile
  • API Tokens
  • Create Token
  • Edit zone DNS (Template)
  • Change permissions from Edit to Read (I tested this with Edit)
  • Add your domains/zones under Zone Resource
  • Add your IPv(4/6) under Client IP Adress Filtering
  • Click on Continue to summary
  • Click on Create Token
@teebow1e
teebow1e / gen.sh
Created February 23, 2025 15:44
generate random string - look like secret, but not secret
tr -dc A-Za-z0-9 </dev/urandom | head -c 32 ; echo
# remote
./cloudflared --url tcp://127.0.0.1:3389
# local
./cloudflared access tcp --hostname uncertainty-saints-newark-martin.trycloudflare.com --url 127.0.0.1:3388
# rdp to 127.0.0.1:3388
@teebow1e
teebow1e / a.py
Created December 31, 2024 08:47
string -> string.fromcharcode js - xss
def string_to_fromcharcode(input_string):
# Convert each character in the string to its char code
char_codes = [str(ord(char)) for char in input_string]
# Create the JavaScript String.fromCharCode representation
fromcharcode_str = "String.fromCharCode(" + ",".join(char_codes) + ")"
return fromcharcode_str
# Example usage
input_string = input()
result = string_to_fromcharcode(input_string)