Skip to content

Instantly share code, notes, and snippets.

View reitowo's full-sized avatar
😽
Saving the world

reito reitowo

😽
Saving the world
View GitHub Profile
@reitowo
reitowo / index.html
Created November 14, 2025 05:13
Transparent
// test-large.html
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
<style>
html,
body {
margin: 0;
@reitowo
reitowo / index.html
Created November 14, 2025 05:11
Transparent
// test-large.html
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
<style>
html,
body {
margin: 0;
@reitowo
reitowo / iframe.html
Created July 15, 2025 15:28
transferable
<!-- Empty -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<!-- You can also require other files to run in this process -->
<script>
@reitowo
reitowo / index.html
Created July 1, 2025 11:16
Electron Spout
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
@reitowo
reitowo / main.go
Created June 22, 2025 18:04 — forked from arianvp/main.go
TPM2 Activation and Attestation flow in Go
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/subtle"
"crypto/x509"
"log"
"math/big"
  1. NCRYPT_USE_PER_BOOT_KEY_FLAG will be erased after reboot, even persisted with name.
  2. NCRYPT_USE_PER_BOOT_KEY_FLAG will not take effect, if same named key was already created with NCRYPT_REQUIRE_VBS_FLAG only.
  3. Same, if a key was created with NCRYPT_USE_PER_BOOT_KEY_FLAG and was created again with NCRYPT_OVERWRITE_KEY_FLAG without NCRYPT_USE_PER_BOOT_KEY_FLAG, this flag will not be overwritten, and the key will keep being erased across boots.
@reitowo
reitowo / win_af_unix_connectex.cpp
Created April 10, 2025 15:40
win_af_unix_connectex.cpp
#include <iostream>
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <afunix.h>
#include <stdlib.h>
#include <stdio.h>
#include <MSWSock.h>
#include <string>
public override async Task OnAtMessage(TBot z, Message msg) {
if (msg.Author.Id != App.MeId || msg.Content != "!抽装扮")
return;
var ctx = _store.Contexts.First();
string[] dynamicIds = ["901551426888532038", "901677050380681222"];
var userPossibilities = new Dictionary<string, int>();
var replies = new List<BiliUserContext.ReplyRecord>();
foreach (var id in dynamicIds) {
@reitowo
reitowo / WarframeLanguagesBinParse.cs
Created December 15, 2023 18:38
Parse Warframe Languages.bin (v35)
Dictionary<string, List<string>> ParseLanguageBin(string fileName) {
var subtitleDict = new Dictionary<string, List<string>>();
using var file = File.OpenRead(fileName);
using var reader = new BinaryReader(file);
var hash = reader.ReadBytes(16);
var version = reader.ReadInt32();
var unkA = reader.ReadInt32();
var unkB = reader.ReadInt32();
@reitowo
reitowo / portfile.cmake
Created January 20, 2023 03:39
vcpkg libyuv use clang-cl with x64-windows MSVC
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://chromium.googlesource.com/libyuv/libyuv
REF 0faf8dd0e004520a61a603a4d2996d5ecc80dc3f
# Check https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/include/libyuv/version.h for a version!
PATCHES
fix-cmakelists.patch
)