Skip to content

Instantly share code, notes, and snippets.

@LightningStalker
LightningStalker / stripall.sh
Created February 22, 2026 11:34
Strip all binary programs in current directory
# Strip all the executable files in current directory that don't have
# '.' character in the name.
echo -n "stripall.sh: Number of programs to strip: "
find -maxdepth 1 -executable \! -name '*.*' | wc -l
echo Stripping...
find -maxdepth 1 -executable \! -name '*.*' -print0 | xargs -0 strip -s
@LightningStalker
LightningStalker / hello.asm
Created February 18, 2026 08:08
fasm hello world DOS
; fasm hello world DOS
; Project Crew™ 2/16/2026
CR equ 13 ; carriage return
LF equ 10 ; line feed
org 100h
start:
mov ah, 9 ; Display String
@LightningStalker
LightningStalker / pink_main.c
Last active February 5, 2026 11:48
Pink noise from CLI
/* depend: Tom Merchant's Voss-McCartney pink-noise approximation algorithm:
* (https://gist.github.com/tom-merchant/5ced03a0638b06138ee7d11c0c209aa4)
*
* output is FLOAT_LE (32-bit)
* Project Crew™ 2/4/2026
*/
#include <stdio.h>
#include <stdlib.h>
#include <curses.h>
@LightningStalker
LightningStalker / floyd.cpp
Last active February 4, 2026 10:11
Generate the pink noise by Voss-McCartney
/* Voss-McCartney pink noise
* Project Crew™ 1/27/2026
*
* Pros might wanna use low freq high pass.
*/
#include <iostream>
#include <cmath>
#include <random>
#include <array>
@LightningStalker
LightningStalker / backup.cpp
Last active January 16, 2026 10:42
Pass files list to mksquashfs
/* wrapper prog for mksquashfs
* to add the missing file list functions
* because xargs have lousy quoting and and shell script also suck
* beware of the MAX_INPUT limit of the shell
* Project Crew™ 1/15/2026
*/
#include <iostream>
#include <fstream>
using namespace std;
@LightningStalker
LightningStalker / TLZ.ASM
Created January 7, 2026 06:46
The Twiddlebit Zone
NAME tz
PAGE 55,132
TITLE TLZ.COM
.MODEL TINY
;
; TLZ.COM: The Twiddlebit Zone
;
; Project Crew, 12.27.2025
@LightningStalker
LightningStalker / fl.cpp
Last active January 17, 2026 16:59
Another demo for the C++ hexdump of previous gist (need the hxd.hpp)
/* Compile with $ g++ -o fl fl.cpp
* Project Crew™ 12/28/2025
*/
#include <iostream>
#include <iomanip>
using namespace std;
#include "fl.hpp"
#include "hxd.hpp"
@LightningStalker
LightningStalker / hxd.cpp
Created December 29, 2025 12:26
C++ hex dump for debug, etc.
/* Compile with $ g++ -o hxd hxd.cpp
* Demonstration of the hexadecimal dumper for the char[]
* Project Crew™ 12/28/2025
*/
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
@LightningStalker
LightningStalker / WC.ASM
Last active April 6, 2026 14:35
"wc" - wordcount in asm for DOS, 8086 +
name wc
title WC.COM--word count
;--- assemble: uasm -bin -Fo WC.COM WC.ASM
;
; Project Crew™ 12/10/2025
display_char macro character
mov dl, character
mov ah, 02h
@LightningStalker
LightningStalker / dirshma.sh
Created November 22, 2025 11:03
make you directry disappear
#!/bin/bash
if [ -d "${1}" ]
then
echo -n 'dirshma.sh: '
rename -v 'y/ -~/0/' "${1}"
until
echo -n 'dirshma.sh: '
rename -v 's/0//' 0*
rmdir 0 2> /dev/null
do