Skip to content

Instantly share code, notes, and snippets.

View nyteshade's full-sized avatar

Brielle Harrison nyteshade

View GitHub Profile
class TypedNumber extends Number {
#number = 0;
#unit = 1;
constructor(number, unit = TypedNumber.PLAIN) {
super(number)
this.#number = number
this.#unit = unit
}
import SwiftUI
/// A row of heterogeneous views separated by a configurable separator,
/// collapsing into a `Menu` when the available width is too small to lay
/// the items out side-by-side.
///
/// Backed by Swift 5.9 parameter packs (Xcode 15, iOS 17, macOS 14), so
/// any arity is supported without per-arity initializer overloads.
struct TupleView<First: View, each Rest: View, Sep: View>: View {
@Environment(\.menuText) private var menuText: MenuText
@nyteshade
nyteshade / carmen.md
Last active March 11, 2026 23:30
Some of my newly drafted subagents for Claude Code

Carmen — Android Quality Specialist

When asked to review, validate, or quality-assess Android code or features, become Carmen. Carmen is a methodical, relentless Android quality enforcer with an unshakeable standard: if it wouldn't survive a mid-tier device on a slow network with battery saver on, it doesn't ship. She's direct, exacting, and quietly furious at mediocrity. She doesn't yell — she dissects.

Carmen's personality

  • Surgically precise: Carmen doesn't wave her hands at problems. She finds the exact line, the exact lifecycle callback, the exact reason the app is leaking memory, and she names it.
  • Unimpressed by excuses: "It works on a Pixel 8" is not an argument. "The user's on a Galaxy A13 with 3GB RAM and spotty LTE" is the argument.
  • Low tolerance for fragmentation denial: She has tested on more devices than you've heard of. She knows where things break. She will tell you.
  • Quietly withering: Her disapproval doesn't come in volume — it comes in precision. A sin
@nyteshade
nyteshade / randstr.c
Created January 27, 2026 18:54
Creates a base36 random string in the shell
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
int wal_stricmp(const char *a, const char *b) {
int ca, cb;
do {
@nyteshade
nyteshade / scriptsort_edit.c
Created January 26, 2026 20:46
Edit scriptsort scripts shell command
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
/* SGR Color Constants */
#define SGR_BOLD "\033[1m"
#define SGR_RED "\033[31m"
#define SGR_GREEN "\033[32m"
@nyteshade
nyteshade / haspath.c
Created January 26, 2026 18:46
Simple shell commands
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* ANSI SGR Escape Codes for Pretty Printing */
#define RED "\033[31m"
#define GREEN "\033[32m"
#define BLUE "\033[34m"
#define RESET "\033[0m"
import Foundation
import SwiftUI
import AppKit
import UniformTypeIdentifiers
/// QEMULauncher: Reads QEMU options from a plist file and launches QEMU with those options
///
/// This application is designed to be placed in App.app/Contents/MacOS/Launcher and will
/// read options from App.app/Contents/Resources/options.plist to launch QEMU.
class QEMULauncher: ObservableObject {
@nyteshade
nyteshade / rocky-linux-8-ai-workbench-setup.sh
Last active July 7, 2025 17:54
Rocky Linux 8 - AI Workbench Setup
# Setup nodejs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
source $HOME/.bashrc
nvm install 24
# Git config setup
git config --global user.email "nyteshade@gmail.com"
git config --global user.name "Brielle Harrison"
# Setup claude-code
@nyteshade
nyteshade / currencyinfo.mjs
Last active March 6, 2025 17:46
ECMAScript Intl CurrencyInfo Class
/**
* Working with the ECMAScript {@link Intl} classes can be a trying and
* exhausting experience. Especially when working with currency strings
* for different locales. This class is designed to provide bi-directional
* formatting and detection of currency values in your code and leverages
* the built-in capabilities of most modern backend and browser based
* JavaScript environments.
*
* @example
* // Shorthand formatting to common combos like USD for 'en-US'
@nyteshade
nyteshade / tool.fatgcc.sh
Last active February 4, 2025 17:49
Fat / Universal Compilation for macOS x86_64 + ARM64
function fat() {
local output="${1}"
local files=($(printf "%s\n" "${2}"))
local GCC_ARGS=(${3:-$(printf "%s\n" "-std=c99 -Wall")})
if [ ${#} -eq 0 ]; then
local argfiles='"<\x1b[93mfile1\x1b[39m> <\x1b[93mfileN\x1b[39m>"'
local argopts='"<\x1b[93mgcc-opt1\x1b[39m> <\x1b[93mgcc-optN\x1b[39m>"'
local argout="<\x1b[93moutput-file\x1b[39m>"