Skip to content

Instantly share code, notes, and snippets.

View hUwUtao's full-sized avatar
🥩
i no beef

stdpi hUwUtao

🥩
i no beef
View GitHub Profile
@hUwUtao
hUwUtao / original.js
Last active September 4, 2024 17:57
Force UrlEncode URL (might not webserver compliant)
"".split("/")
.map((p, i) =>
i >= 3
? p
.split("")
.map((c) =>
"?#".includes(c)
? c
: `%${c.charCodeAt(0).toString(16).padStart(2, "0")}`,
)
@hUwUtao
hUwUtao / readme.md
Last active July 24, 2024 16:42
automatically deploy wings

Install

  1. sudo su
  2. install acme.sh as root
  3. open port 80 and acme.sh --issue --standalone -d <YOUR_DOMAIN>
echo "DOMAIN=<YOUR_DOMAIN>">.env
curl -LO https://gist.githubusercontent.com/hUwUtao/896f925b51f0c50e100af70c671450d0/raw/28e5e79cb9d1e49427addee286f986cc75a11c49/wings.sh
chmod +x wings.sh
./wings.sh
@hUwUtao
hUwUtao / compare_in_range.c
Last active May 17, 2024 12:13
prime related c pracs
int main() {
ll a,b,c,d,e=0,f=0;
scanf("%lld %lld %lld %lld", &a,&b,&c,&d);
#define in(n,l,g) n >= l && n <= g
for(ull i = (a<c?a:c) ; i<= (b>d?b:d) ; i++){
if(!pr(i)){
if(in(i,a,b))e++;
if(in(i,c,d))f++;
//printf("%lld %lld %lld\n",i,e,f);
}
@hUwUtao
hUwUtao / encit.sh
Last active May 12, 2024 19:02
A tool to quickly encrypt stuff without yapping about command line. Result a self-extract and pipeable. Still require user-typed password :))
#!/usr/bin/bash
COMPRESSION=${COMPRESSION:-"gzip"}
ALGORITHM=${ALGORITHM:-"-aes-256-cbc"}
OUTC=$([ "$PLSAVE" == true ]; printf ">\"$1\"")
OUTF="$1.sh"
echo $OUTC $OUTF
@hUwUtao
hUwUtao / 1.py
Last active March 1, 2024 10:12
cp 101
def main():
fs = open("flowers.inp", "r")
n = int(fs.readline())
a = list(map(int, fs.readline().split(" ")))
for i, c in enumerate(a[:-3]):
if c == a[i+1] == a[i+2] and c != a[i+3]:
print(n - i -1)
return
print(n)
main()
@hUwUtao
hUwUtao / 32.js
Created January 21, 2024 13:11
simai explode
copy(
[...document.querySelectorAll("table")]
.slice(1, -3)
.flatMap((d) =>
[...d.querySelector("tbody").querySelectorAll("tr")].map((r) =>
[...r.querySelectorAll("td")].map((r) => r.innerHTML),
),
)
.map((r) =>
r[0].startsWith("<a")
@hUwUtao
hUwUtao / README.md
Last active January 11, 2024 17:37
Các câu lệnh mycommands armstand config của Team Fuho

Các lệnh sửa armorstand thủ công

  • Dành cho server chạy MyCommands

Lưu ý

Lệnh sẽ lựa chọn thực thể armor_stand gần nhất, tối đa 1, trong bán kính giới hạn 1

Các lệnh

@hUwUtao
hUwUtao / chat.txt
Created January 7, 2024 16:09
drunk_talk about programming
A — Hôm nay lúc 22:54
I ain't learning a React framework 💀
archlinux 6.4.12-zen1-1-zen — Hôm nay lúc 22:55
vite is not a framework!
it is a bundler
React is not a framework!
React is a library
Laravel is a framework!
NextJS is a framework
@hUwUtao
hUwUtao / README.md
Last active November 25, 2023 17:19
Project REL

Project REL

This page constantly update progress of this project. Well, basically scraping Facebook relative friend into a cool format

Patch 1 - Basic Regex bd

endpoint

https://mbasic.facebook.com/~/friends
@hUwUtao
hUwUtao / monokai.json
Created November 4, 2023 17:04
Monokai Classic (vscode theme for Vencord's ShikiCodeblocks)
{"name":"Monokai Classic","type":"dark","author":"Monokai","uuid":"80f15e1b-1789-50a6-8010-70c32bb81b6d","colorSpaceName":"sRGB","colors":{"activityBar.activeFocusBorder":"#e6db74","activityBar.background":"#161613","activityBar.border":"#161613","activityBar.foreground":"#c0c1b5","activityBar.inactiveForeground":"#57584f","activityBarBadge.background":"#e6db74","activityBarBadge.foreground":"#272822","badge.background":"#e6db74","badge.foreground":"#272822","banner.background":"#3b3c35","banner.foreground":"#c0c1b5","banner.iconForeground":"#c0c1b5","breadcrumb.activeSelectionForeground":"#fdfff1","breadcrumb.focusForeground":"#c0c1b5","breadcrumb.foreground":"#919288","button.background":"#3b3c35","button.foreground":"#c0c1b5","button.hoverBackground":"#57584f","button.secondaryBackground":"#3b3c35","button.secondaryForeground":"#c0c1b5","button.secondaryHoverBackground":"#57584f","button.separator":"#272822","charts.blue":"#66d9ef","charts.foreground":"#fdfff1","charts.green":"#a6e22e","charts.lines":"#6e7