Skip to content

Instantly share code, notes, and snippets.

View reitowo's full-sized avatar
😽
adventure

reito reitowo

😽
adventure
View GitHub Profile
@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
)
@reitowo
reitowo / default.css
Last active May 28, 2022 09:00
blivechat default
@import url("https://fonts.googleapis.com/css?family=Changa%20One");
@import url("https://fonts.googleapis.com/css?family=Imprima");
/* Transparent background */
yt-live-chat-renderer {
background-color: transparent !important;
}
yt-live-chat-ticker-renderer {
background-color: transparent !important;
@reitowo
reitowo / weibo.cs
Last active June 1, 2022 16:46
Weibo Persistent Cookie
// 储存Cookie类
public class WeiboToken {
public string Gsid { get; set; }
public string Uid { get; set; }
public DateTime LoginTime { get; set; }
public List<Cookie> Cookies { get; set; }
}
// Step 1: Login
if (msg.Content.StartsWith("weibo")) {
{
"meta": {
"theme": "even"
},
"basics": {
"name": "Wang Zhongwei",
"label": "Full Stack Engineer",
"image": "",
"email": "[email protected]",
"phone": "(86) 186-5298-5013",
@reitowo
reitowo / aes-ctr.cs
Created January 1, 2022 11:04
Stream Crypto AES-256-CTR C# Implementation
using System.Security.Cryptography;
namespace TgServer.Crypto;
public sealed class AesCtr {
private readonly byte[] _key;
private readonly byte[] _counter;
private readonly byte[] _blockKey;
private readonly ICryptoTransform _encryptor;
@reitowo
reitowo / code.cs
Created October 11, 2021 07:43
Unity Editor Change UI Scale Factor With Game View
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.UI;
@reitowo
reitowo / auto-update.py
Last active April 21, 2021 05:22
Vcpkg Registry Ports Auto Update (Github Only)
import requests
import pathlib
import re
import hashlib
import json
import version_parser
import git
import argparse
proxy = {'http': 'http://127.0.0.1:10809', 'https': 'http://127.0.0.1:10809'}