Skip to content

Instantly share code, notes, and snippets.

View etscrivner's full-sized avatar
🦋

Eric Scrivner etscrivner

🦋
View GitHub Profile
/*
oh4_lbp_serializer.h - v0.1 - public domain
Authored 2026 by Eric Scrivner
no warranty implied; use at your own risk
Before including,
#define OH4_LBP_SERIALIZER_IMPLEMENTATION
in the file that you want to have the implementation.
@etscrivner
etscrivner / Assay.SPEC.md
Last active April 5, 2026 15:53
Specification of statistical quality control approach to software dark factory orchestration.

Autonomous Product Factory — System Specification

Overview

A system for autonomously building software products using AI agents. Agents operate in structured loops, progressing through a specification pipeline from idea to validated implementation — with minimal or no human intervention.

Influences

  • ralph-loop — simple iterative agent loops with completion detection
  • ai-prd-workflow — structured pipeline from idea to tested code
@etscrivner
etscrivner / oh4_halftone.h
Created April 2, 2026 17:43
Single-header C library for converting continuous-tone images down to 1-bit via grayscale conversion, tonal adjustment, sharpening, edge detection, and dithering. Largely targeted at the Playdate.
/*
oh4_halftone.h - v1.1 - public domain
Authored 2026 by Eric Scrivner
no warranty implied; use at your own risk
Before including,
#define OH4_HALFTONE_IMPLEMENTATION
in the file that you want to have the implementation.
@etscrivner
etscrivner / Pomodoro.c
Created October 18, 2024 22:39
Tiny Win32 Pomodoro Timer
/*
==============================================================================
Pomodoro.c - Tiny Win32 Pomodoro Timer
==============================================================================
*/
/*
==============================================================================
@etscrivner
etscrivner / ast.c
Last active May 25, 2024 23:29
Simple math expression tokenizer and parser in C.
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdarg.h>
typedef enum eToken_Type eToken_Type;
enum eToken_Type {
TOKENTYPE_number,
TOKENTYPE_operator,
TOKENTYPE_lparen,
@etscrivner
etscrivner / Bayer.c
Created October 12, 2023 19:38
Dithering on a grayscale bitmap with 2x2, 4x4, and 8x8 Bayer matrices.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "ext/stb_image_write.h"
uint8_t* GenerateGrayGradientBitmap(int width, int height) {
uint8_t* result = (uint8_t*)malloc(width * height);
@etscrivner
etscrivner / japser.c
Created May 9, 2021 00:09
Jasper is a simple markdown parser that uses successive application of rewriting rules to apply markdown to a file.
// jasper.c - Processor for custom flavor of markdown called jasperstone
//
// Description:
//
// Jasperstone processes a markup file by applying a set of rewriting rules to
// the document. Each rewriting rule processes the entire document replacing a
// particular piece of syntax. The end result is a file that is completely
// marked up without the need for a complex parser.
#include <inttypes.h>
#include <stdarg.h>
@etscrivner
etscrivner / tea-timer.el
Created June 9, 2020 02:53
Tea steep timer. Blinks the modeline bar red when the tea is done steeping.
;;
;; Simple timer that will blink the mode-line bar.
;;
;; Example Usage:
;;
;; Set a timer for 5 secs from now:
;;
;; (blink-bar-after-timer "5 sec")
;;
;; Set a timer for when tea has steeped after 3 mins:
#if !defined(EMACS_COMMAND_MAP_H)
#define EMACS_COMMAND_MAP_H
// Create custom ID for our global emacs state data.
CUSTOM_ID(attachment, view_emacs_state_id);
CUSTOM_COMMAND_SIG(close_all_other_panels)
CUSTOM_DOC("Closes all other panels but the currently active one")
{
View_ID current_active_view_id = get_active_view(app, Access_Always);
@etscrivner
etscrivner / sha2.h
Created February 27, 2020 17:34
Single-header file SHA2 implementation from FreeBSD.
/* $FreeBSD: src/sys/crypto/sha2/sha2.h,v 1.1.2.1 2001/07/03 11:01:36 ume Exp $ */
/* $KAME: sha2.h,v 1.3 2001/03/12 08:27:48 itojun Exp $ */
/*
* sha2.h
*
* Version 1.0.0beta1
*
* Written by Aaron D. Gifford <me@aarongifford.com>
*