Skip to content

Instantly share code, notes, and snippets.

@moreaki
moreaki / async-operations-and-sse-runtime-embedded.html
Created April 24, 2026 09:17
Sigma Backend: embedded HTML for Async Operations And SSE Runtime chapter (temporary)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="Project Authors" />
<meta name="dcterms.date" content="2026-04-24" />
<title>Async Operations And SSE Runtime - Sigma Developer Guide</title>
<style>
@moreaki
moreaki / README.md
Created April 22, 2026 21:42
WeasyPrint SVG inline-size visual proof sources

SVG inline-size visual proof

These files reproduce the two SVG examples added to the PR proof:

  • vertical-inline-size.svg renders Japanese vertical text with writing-mode: vertical-rl and inline-size: 200px.
  • rtl-inline-size.svg renders Arabic RTL text with direction: rtl and inline-size: 200px.
  • inline-size-proof.html places both examples on one page for a compact rendered PNG.

Render locally from the WeasyPrint checkout with:

@moreaki
moreaki / README.md
Last active April 22, 2026 20:56
Reusable WeasyPrint SVG positioned text proof and timing fixture

WeasyPrint SVG Positioned Text Proof

This gist contains a reusable visual and timing fixture for SVG positioned text with bidirectional text, invisible controls, combining marks, ligatures, and complex-script clusters.

The files are intentionally standalone. They do not depend on a specific local checkout path.

Requirements

@moreaki
moreaki / DispatchSourceNestedWriteCheck.swift
Created March 15, 2026 01:08
Issue #480 investigation scripts: root-only DispatchSource watcher vs recursive FSEvents
import Foundation
import Dispatch
let fileManager = FileManager.default
let rootURL = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
.appendingPathComponent("latest-watch-test-\(UUID().uuidString)", isDirectory: true)
let nestedURL = rootURL.appendingPathComponent("Browsers", isDirectory: true)
try fileManager.createDirectory(at: nestedURL, withIntermediateDirectories: true)
defer { try? fileManager.removeItem(at: rootURL) }
@moreaki
moreaki / AppDirectoryTest.swift
Created March 15, 2026 01:07
Regression test for Latest recursive subfolder watcher
//
// AppDirectoryTest.swift
// Latest Tests
//
// Created by Codex on 15.03.26.
//
import XCTest
@testable import Latest
@moreaki
moreaki / exploit-analysis.js
Created September 10, 2025 21:01
SUPPLY CHAIN HACK: Analysis from GPT
/* ========================================================================
* MALICIOUS SCRIPT — ANALYSIS EDITION (NON-EXECUTABLE)
* Purpose (original):
* 1) Patch fetch/XMLHttpRequest responses to replace crypto addresses
* 2) Hook wallet providers (Ethereum, Solana) and rewrite outgoing txs
* ===================================================================== */
/** Global flags used by the original */
let hasEthAccount = 0; // neth
let alreadyRan = 0; // rund
@moreaki
moreaki / kk.c
Created January 2, 2017 21:20
Test code to compare different diassembly and decompiling strategies on MacOSX
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define d32 32-__builtin_clz
#define d64 64-__builtin_clzl
#define F_U32 "%24u: f1_u32:%2d f2_u32:%2d f1_u64:%2d f2_u64:%2d type:%18s\n"
#define F_U64 "%24llu: f1_u32:%2d f2_u32:%2d f1_u64:%2d f2_u64:%2d type:%18s\n"
/* kk.c: Testcode for debugging decompiling functionality
//
// PropertyMacros.h
//
//
// Created by Nicolas Bouilleaud on 12/04/12,
// using ideas by Uli Kusterer (http://orangejuiceliberationfront.com/safe-key-value-coding/)
// Laurent Deniau (https://groups.google.com/forum/?fromgroups#!topic/comp.std.c/d-6Mj5Lko_s)
// and Nick Forge (http://forgecode.net/2011/11/compile-time-checking-of-kvc-keys/)
//
//
/*/../bin/ls > /dev/null
COMPILED=${0%.*}
clang $0 -o $COMPILED -framework Foundation;
$COMPILED; rm $COMPILED; exit;
*/
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])