Skip to content

Instantly share code, notes, and snippets.

@Little-Ki
Little-Ki / Base64.ts
Last active September 19, 2023 02:43
[TypeScript] Base64
let Base64 = (function () {
let dic = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
let encode = (array: Int8Array | Uint8Array | number[]) => {
let result = [];
let i = 0;
while (i < array.length) {
let b0 = array[i++];
let b1 = array[i++];
let b2 = array[i++];
@Little-Ki
Little-Ki / ThreadIn.h
Last active January 6, 2025 05:42
[Hack] Freeze thread
#pragma once
// origin: https://github.com/illegal-instruction-co/ThreadIn
#ifdef _WIN64
#define XIP Rip
#else
#define XIP Eip
#endif
#include <thread>