Skip to content

Instantly share code, notes, and snippets.

@Zxilly
Zxilly / json.cj
Created August 20, 2024 15:10
Broken parser
macro package json_cj
import std.ast.*
public import json_cj.helper.castJsonValue
enum JsonState {
| Initial
| ObjectStart
| ObjectKey
| ObjectColon
From c36f0134350358f0723fdd12d50f37bfef67f6ff Mon Sep 17 00:00:00 2001
From: Zxilly <zxilly@outlook.com>
Date: Fri, 12 Jul 2024 22:45:00 +0800
Subject: [PATCH] internal/bytealg: extend memchr result correctly
---
src/internal/bytealg/indexbyte_wasm.s | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/internal/bytealg/indexbyte_wasm.s b/src/internal/bytealg/indexbyte_wasm.s
import socket
import argparse
import threading
import logging
def main(server_ip, server_port, log_file):
logging.basicConfig(filename=log_file, level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s')
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as server_socket:
@Zxilly
Zxilly / archive.key
Created October 24, 2023 06:51
Xanmod key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQENBFhxW04BCAC61HuxBVf1XJiQjXu/DSAtVcnuK38geDoDjcqFtHskFy32NgJG
X118EFNym6noF+oibaSftI9yjHthWvMnYZ/+DPwd7YZhbAjBvxMIQCsP6cFVxrgc
VV8g+uh4TCfbpalDBFoncRhQCgkmDN9Vd4kIWRh6BHJuzpKB/h2KxUHZVEKgWlK2
dR1xUtbrc+kp8gLwPbxTgC3tZ4x2uMMMlnbyCMSRa5oJ/AvoW4W1XphKL9ivsFHM
PSQkUBDvgv2RPw+0XBxPy8SYE0r0onx0ZIpjJRTODt3bSV6/0owwlpNogV9bT8HY
kl3+w3mTwax6S1akHZuJtLkZS0uUBz1BHt5bABEBAAG0IVhhbk1vZCBLZXJuZWwg
PGtlcm5lbEB4YW5tb2Qub3JnPokBNwQTAQgAIQUCWHFbTgIbAwULCQgHAgYVCAkK
import subprocess
import uuid
import uvicorn
from fastapi import FastAPI, UploadFile, File
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
@Zxilly
Zxilly / gsoc-2021.md
Last active November 24, 2021 07:03
C++ 3 hrs 47 mins ██████████▍░░░░░░░░░░ 49.8%
Rust 1 hr 41 mins ████▋░░░░░░░░░░░░░░░░ 22.3%
TypeScript 25 mins █▏░░░░░░░░░░░░░░░░░░░ 5.5%
Other 20 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.6%
Text 18 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0%
@Zxilly
Zxilly / jgsu-web.sh
Created November 29, 2020 13:52
Fxxk JGSU Web Auth (井冈山大学校园网登陆脚本)
#!/bin/sh
studentid='' # 用户名
password='' # 密码
IP=$(ubus call network.interface.wan status | grep \"address\" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
# IP="10.73.26.189"
UA="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
function login() {
#!/bin/sh
curl 'https://www.baidu.com/s?ie=UTF-8&wd=curl%20useragent' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 Edg/85.0.564.51' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: navigate' \