Skip to content

Instantly share code, notes, and snippets.

View skull-squadron's full-sized avatar
💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s

🏴‍☠️ 💪📎 skull-squadron

💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s
  • Hill country
View GitHub Profile
@skull-squadron
skull-squadron / 000readme.md
Last active December 26, 2025 16:28
Copy the Windows 2000 (any version) install CD to C:\SETUP\{{cd_name}} and inform Windows about it

By creating a .bat file with an appended binary similar to a UNIX shar installer.

How to create the .bat from header.bat

copy /a header.bat + /b regini.exe /b copy-win-cd-local.bat

regini.exe
  • Size: 35600 bytes
@skull-squadron
skull-squadron / megafort.txt
Last active December 24, 2025 08:55
Megafortress IBM PC DOS all versions (1.0, 1.1, 1.2) IFF code bypass
--- Megafortress IBM PC DOS all versions IFF code bypass ---
Hex edit to the following:
MEGA.EXE 1.0 (US or UK 1.44MB) SHA256: F5A8689AF21C3250F640B0F1BBD55DC36A2B9AE2A19DCA18C706C6C71463127E
Offset 15D3A: 3B 56 FE 74 -> 89 56 FE EB
New SHA256: CC6FB1F3CD136AEBB698CC9169C3728DC4152EE3B321A997B76D61021CA2D26B
@skull-squadron
skull-squadron / [email protected]
Last active December 14, 2025 20:51
tapioca-generated RBI for HTTPX (sorbet/rbi/gems/[email protected] created via `bundle exec tapioca gems` where gem httpx is a dependency))
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `httpx` gem.
# Please instead update this file by running `bin/tapioca gem httpx`.
# Top-Level Namespace
#
# source://httpx//lib/httpx/version.rb#3
@skull-squadron
skull-squadron / Makefile
Last active December 9, 2025 13:12
dufff - Faster and betterer than `du -sh` and `find -printf . | wc -c`
CC ?= cc
CFLAGS ?= -DNDEBUG -std=c99 -O3
dufff: dufff.c
$(CC) $(CFLAGS) dufff.c -o dufff
MODULE du;
IMPORT FIO,IO,Lib,Str,SYSTEM,Storage;
TYPE
String = ARRAY [0..128] OF CHAR;
FileSpec = RECORD
i : BOOLEAN;
n : String;
END;
@skull-squadron
skull-squadron / json2img
Created December 4, 2025 20:23
Convert pc2js JSON disk image to local image and extract files
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# Converts https://www.pcjs.org json disk image to real disk .img and extract files
#
# Usage: json2img [options..] {infile.json|https://path/to/web/disk.json} [OUT_DIR]
#
# -v|--verbose verbose
# -n|--no-op no-op
#
@skull-squadron
skull-squadron / filetopcx
Last active October 19, 2025 12:49
any image to PCX converter script helper
#!/usr/bin/env bash
# requires magick from ImageMagick >= 6.5 (7+ is okay too)
# Suppors output to non-pcx formats too:
# --ext .bmp
# Can be sourced by zsh or bash, but only use filetopcx__convert_file or filetopcx__main
filetopcx__tmpdir=
filetopcx__ext='.pcx'
filetopcx__files=()
filetopcx__args=(
-compress RLE
@skull-squadron
skull-squadron / types.rs
Created October 17, 2025 17:43
Rust concrete typed ontology
use serde::{Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet, LinkedList},
convert::From,
hash::{Hash, Hasher},
};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[repr(u8)]
pub enum Literal {
@skull-squadron
skull-squadron / crate-bin-setup
Created October 5, 2025 10:57
Rust setup script to automatically install the correct toolchain, components, and tool crates
#!/usr/bin/env bash
set -eEuo pipefail
# Should live as: {{project}}/bin/setup
# Requires:
# - {{project}}/.config/setup-install-tool-crates.txt
# - {{project}}/rust-toolchain.toml
cd "${TOP_DIR:-$(cd "$(dirname "$0")" && cd .. && pwd)}"
readarray -t packages < <(sed 's/#.*//;/^[[:space:]]*$/d' .config/setup-install-tool-crates.txt)
@skull-squadron
skull-squadron / to_csv.rs
Last active October 5, 2025 09:44
Easy Rust CSV serialization with serde::Serialize
use anyhow::{Result, bail};
use csv::{Writer, WriterBuilder};
use serde::Serialize;
pub trait ToCsv {
fn to_csv(self) -> Result<String>;
fn to_csv_without_header(self) -> Result<String>;
fn to_csv_with_header<I, T>(self, header: I) -> Result<String>
where
I: IntoIterator<Item = T> + Clone,