Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
@andrisgauracs
andrisgauracs / run_prompt.sh
Created July 31, 2026 02:57
Test a custom prompt against an already-trained, already-flashed ESP32-S3 model
#!/usr/bin/env bash
# esp32-ai: test a custom prompt against an already-trained, already-flashed model.
# Does NOT retrain and does NOT rewrite the 15MB model partition.
#
# Usage:
# ./run_custom_prompt.sh "Once there was a robot"
set -euo pipefail
if [ "$#" -lt 1 ]; then
echo "Usage: $0 \"Your custom prompt\""
@andrisgauracs
andrisgauracs / build_and_flash.sh
Created July 31, 2026 02:21
One Shot Build Script For Running 28M AI Model On ESP32-S3
#!/usr/bin/env bash
# esp32-ai: clone, train, export, build, and flash — end to end
# Reproduces github.com/slvDev/esp32-ai from a bare board.
# Requires: ESP32-S3 N16R8 (16MB flash, 8MB PSRAM).
#
# Usage:
# ./build_and_flash.sh # full run: data prep, train, export, build, flash
# ./build_and_flash.sh --skip-train # reuse an existing firmware/model/model.bin, just build + flash
set -euo pipefail

Rust Engineering Best Practices

A complete project standard for writing correct, explicit, allocation-aware, production-grade Rust.

This document is intended to replace the previous rust-best-practices.md Gist in full. It integrates ownership, API design, error handling, testing, linting, performance, debug_assert!() usage, and heap-allocation discipline into one coherent set of rules.

Status and terminology

This is a normative engineering guide, not an introductory Rust tutorial.

@auser
auser / imagedet.rs
Created August 18, 2025 04:17 — forked from a-agmon/imagedet.rs
Using graph-flow to identify object
use async_trait::async_trait;
use chrono::Local;
use graph_flow::{
Context, ExecutionStatus, FlowRunner, GraphBuilder, GraphStorage, InMemoryGraphStorage,
InMemorySessionStorage, NextAction, Session, SessionStorage, Task, TaskResult,
};
use image::{ImageBuffer, Rgb};
use minifb::{Key, Window, WindowOptions};
use nokhwa::{
pixel_format::RgbFormat,
@a-agmon
a-agmon / imagedet.rs
Created August 3, 2025 18:17
Using graph-flow to identify object
use async_trait::async_trait;
use chrono::Local;
use graph_flow::{
Context, ExecutionStatus, FlowRunner, GraphBuilder, GraphStorage, InMemoryGraphStorage,
InMemorySessionStorage, NextAction, Session, SessionStorage, Task, TaskResult,
};
use image::{ImageBuffer, Rgb};
use minifb::{Key, Window, WindowOptions};
use nokhwa::{
pixel_format::RgbFormat,
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active May 4, 2026 14:08
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active July 29, 2026 11:02
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.

@terjanq
terjanq / HTPL-solution.html
Last active November 6, 2022 22:11
Hack.lu 2022 CTF solutions
<!--
This was a sandboxing challenge where the JS language is presenteded in the form of exotic, made-up language.
It's almost properly sandboxed but there is one bug that players needed to find.
The bug I found was to construct HTML comment (<!--) that is understood by JS and which makes it possible to ignore one semicolon
and then to concat array expression with variable name, like $var$['eval']. To get reference to eval we used DOM clobbering
and defined <iframe name=$win$>
-->
<iframe name=$win$></iframe>
<x-program>
@nateraw
nateraw / stable_diffusion_walk.py
Created August 18, 2022 05:59
Walk between stable diffusion text prompts
"""
Built on top of this gist by @karpathy:
https://gist.github.com/karpathy/00103b0037c5aaea32fe1da1af553355
stable diffusion dreaming over text prompts
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stable_diffusion_walk.py --prompts "['blueberry spaghetti', 'strawberry spaghetti']" --seeds 243,523 --name berry_good_spaghetti
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 23, 2026 06:11
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool