This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can use part or all of this code without my permission | |
// $ clang++ main.cpp -lX11 -lXtst -lpthread | |
#include <csignal> | |
#include <chrono> | |
#include <iostream> | |
#include <string> | |
#include <thread> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Reorder WAV chunks files | |
-- This often useful if particular program expects "WAVE" identifier | |
-- followed by "fmt " chunk and followed by "data " chunk. Particularly | |
-- GTA San Andreas User Tracks. | |
-- You can use part or all of this code without my permissions. | |
local arg = {...} | |
local fin = assert(io.open(assert(arg[1], "need input file"), "rb")) | |
local fout = assert(io.open(assert(arg[2], "need output file"), "wb")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using MSVC toolchain, compile this as follows | |
$ clang.exe -target i386-pc-windows-msvc -shared -o dummy.dll dummy.cpp | |
*/ | |
#include <cstdio> | |
struct __declspec(dllexport) DummyBase | |
{ | |
int someValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- timerEx 2020 by MikuAuahDark | |
-- A rewrite of my 7-year-old timerEx 4.0 | |
-- The old can be found here | |
-- https://www.unrealsoftware.de/files_show.php?file=13759 | |
--[[--------------------------------------------------------------------------- | |
-- Copyright (c) 2020 Miku AuahDark | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a | |
-- copy of this software and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, including without limitation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- io.open patch to allow UTF-8 filenames in Windows | |
-- Copyright (c) 2020 Miku AuahDark | |
-- You can use portion of this code or as a whole without my permission. | |
local ffi = require("ffi") | |
if ffi.os ~= "Windows" then | |
-- Not Windows | |
return | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code to check whetever PNG image is normal PNG image or it also contain | |
// Koikatu data like character or clothes. | |
// Copyright (c) 2023 Miku AuahDark | |
// You can use portion of this code or as a whole without my permission. | |
// clang++ -std=c++17 -D_CRT_SECURE_NO_WARNINGS koikatu_check.cpp | |
#include <cerrno> | |
#include <cstdio> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
function showUsage(string $scriptName): void | |
{ | |
echo "Usage: $scriptName <[l]ist|e[x]tract|[s]ync|[h]ash> <options>", PHP_EOL; | |
echo 'List usage: list', PHP_EOL; | |
echo 'Extract usage: extract <ID from list> <zip output>', PHP_EOL; | |
echo 'Sync usage: sync <osustable install>', PHP_EOL; | |
echo 'Hash usage: hash <ID from list>', PHP_EOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HMNS Context info file structure. | |
Version 1 | |
All datatypes specified are in little endian. Integer types is assumed to be unsigned. | |
header - dword ('HMNS') | |
version - dword, 1 as of writing. | |
preflen - dword, prefix length without null-terminator. | |
prefix - byte[n], prefix string, without null-terminator. | |
dummy - align 4 bytes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LOVE Xorshift* implementation as of 11.3 | |
// Reimplemented for consistency reasons. | |
// In any case, the license goes to LOVE Development Team which is zLib license. | |
// std | |
#include <stdint.h> | |
// STL | |
#include <random> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script that monkeypatch LOVE Transform | |
-- to add 3D support | |
local love = require("love") | |
local t = love.math.newTransform() | |
local t2 = love.math.newTransform() | |
local transformMt = getmetatable(t) | |
local function applyDump(ts, ...) | |
t2:reset() | |
t2:apply(ts) |