Skip to content

Instantly share code, notes, and snippets.

View jeremychone's full-sized avatar

Jeremy Chone jeremychone

View GitHub Profile
# Dev Chat
Add a new `## Request: _user_ask_title_concise_` with the answer below (concise title). Use markdown sub-headings for sub sections. Keep this top instruction in this file.
## Request: sub-agent event model over pre-post stages
### Summary
You want to replace the current boolean stage model for coder sub-agents:
@jeremychone
jeremychone / gist:e1d882f7ece6cf7bbb0fd5a7ef8cb9c4
Last active April 7, 2026 01:13
AIPack Cli vs. pro@coder CLI
======
User
===
I have a CLI for an agentic runtime, AIPack, written in Rust, and it allows you to build, run, and share AI packs written in Lua and Markdown.
It allows you to build, run, and share agent packs. An agent can be a single .aip file, Markdown/Lua, or a folder of .aip and .lua files.
One of the packs is `pro@coder`, which is, in a way, the main pack, and a very efficient way to code.
@jeremychone
jeremychone / rust-let-else.rs
Last active August 31, 2025 17:00
Rust 1.65 - let-else statements - new language feature!!! For youtube video: https://www.youtube.com/watch?v=U-5_bumwH9w&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q)
//! For youtube video: https://www.youtube.com/watch?v=U-5_bumwH9w&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q
/// Guard pattern with let-else
/// e.g., "my_key: 123"
pub fn key_num_guard_1(item: &str) -> Result<(&str, i32), &'static str> {
let Some((key, val)) = item.split_once(':') else {
return Err("Invalid item");
};
let Ok(val) = val.trim().parse::<i32>() else {
return Err("Invalid item");
{
"pair_lgt": {
"prefix": "<",
"body": [
"<$1>"
],
"description": "<> pair"
},
"pair_bars": {
"prefix": "|",
// Place your settings in this file to overwrite the default settings
{
"http.proxySupport": "off", // by default we use tabs
"files.associations": {
"*.pcss": "scss",
"*.tmpl": "html",
"*.hmd": "markdown",
"*.sketchscript": "javascript",
"*.hmt": "markdown"
},
{
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"workbench.activityBar.visible": false,
// "editor.glyphMargin": false,
"editor.suggest.showIcons": false,
"editor.lightbulb.enabled": false,
// "editor.hover.enabled": false,
// "typescript.suggestionActions.enabled": false,
@jeremychone
jeremychone / rust-xp-03-redis.rs
Last active September 9, 2023 06:33
Rust Redis with Async/Await (single threaded concurrency) | RustLang by example
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use std::{error::Error, time::Duration};
use tokio::time::sleep;
use redis::{
from_redis_value,
streams::{StreamRangeReply, StreamReadOptions, StreamReadReply},
AsyncCommands, Client,
};
@jeremychone
jeremychone / rust-xp-02-postgresql-sqlx.rs
Created May 11, 2021 05:48
Rust to PostgreSQL with SQLX | Rust By Example
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use sqlx::postgres::{PgPoolOptions, PgRow};
use sqlx::{FromRow, Row};
// Youtube episode: https://youtu.be/VuVOyUbFSI0
// region: Section
// Start postgresql server docker image:
@jeremychone
jeremychone / rust-xp-01-s3.rs
Last active October 22, 2025 05:03
Rust Quick Example to connect to S3 and Minio bucket server
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use std::{error::Error, str};
use s3::bucket::Bucket;
use s3::creds::Credentials;
use s3::region::Region;
use s3::BucketConfiguration;
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8