Skip to content

Instantly share code, notes, and snippets.

View sam0x17's full-sized avatar

sam0x17 sam0x17

View GitHub Profile
@sam0x17
sam0x17 / PUBLICATION.md
Created September 8, 2026 18:10
SN78 seven-day bootstrap service-weight policy

SN78 seven-day bootstrap service-weight policy

Status: temporary public bootstrap profile

This policy authorizes the bootstrap_service_binary mechanism on Finney SN78, MechId 0. It does not activate ASL translation scoring, create a translation leaderboard, or receive Section 14 activation credit.

@sam0x17
sam0x17 / GIST_SN78_REGISTERED_MINER_COMPONENT_PILOT.md
Last active September 7, 2026 20:58
SN78 public registered-miner endpoint pilot instructions

SN78 public registered-miner endpoint pilot

UMI is accepting registered SN78 miners for a public endpoint interoperability pilot.

The pilot sends one btauth/1 request with a known public ASL clip to the HTTPS endpoint in the miner's finalized SN78 serving record. UMI verifies the miner's signed, timelocked response and publishes the request, response or bounded failure, revealed references, exact score trace, finalized chain observation, coordinator attestation, and immutable replay bundle at:

@sam0x17
sam0x17 / optimize.md
Last active June 17, 2026 13:30
/optimize claude skill for optimizing performance of a codebase that has benchmarks
name optimize
description Continuously iterate on a codebase to improve benchmark performance. Runs benchmarks, makes targeted optimizations, compares against baseline, validates improvements, and reverts regressions. Keeps looping until tangible improvements are achieved.
argument-hint [benchmark-command]
effort max

Optimizer — Iterative Benchmark Optimizer

You are an iterative performance optimizer. Your job is to repeatedly run benchmarks,

name cold-read
description Two-pass cold-reader review of a written work — paper, book, whitepaper, design doc, spec, or a code repo's README/docs — simulating a fresh reader. Auto-locates the primary artifact to review, tracks observations across two passes, and reports a synthesized punch list. Accepts optional focus arguments.

Cold Read

Perform a thorough cold-reader review of a repository's primary written artifact, simulating a fresh reader encountering it for the first time, and report back with substantive observations.

Strict process rules

@sam0x17
sam0x17 / fix_docker.sh
Created May 15, 2026 14:26
Fix docker upon restoring mac OS backup
# Quit Docker Desktop first, then:
rm -rf ~/Library/Containers/com.docker.docker/Data/vms
rm -rf ~/Library/Group\ Containers/group.com.docker/VirtualMachines
@sam0x17
sam0x17 / postgres_setup.sh
Created July 9, 2024 01:21
mac os postgresql setup 2024
#!/bin/sh
brew update
brew upgrade
brew install postgresql
createuser -s postgres
brew services start postgresql
@sam0x17
sam0x17 / keybase.md
Created November 30, 2023 21:48
keybase.md

Keybase proof

I hereby claim:

  • I am sam0x17 on github.
  • I am sam0x17 (https://keybase.io/sam0x17) on keybase.
  • I have a public key ASD59tnchzvt33Gvmfz_J-ooAwmgcVE5dopA3Nkd9RgNrwo

To claim this, I am signing this object:

@sam0x17
sam0x17 / evil_rust.rs
Created August 18, 2023 06:05
evil rust
trait RawBytes: Sized {
fn raw_bytes(&self) -> &[u8] {
let ptr = self as *const Self as *const u8;
unsafe { core::slice::from_raw_parts(ptr, std::mem::size_of::<Self>()) }
}
}
impl<T> RawBytes for T {}
@sam0x17
sam0x17 / question_closure_trick.rs
Created July 26, 2023 15:49
Rust workaround for "the `?` operator can only be used in a closure that returns `Result` or `Option`" when trying to use `?` inside a closure inside a `.map`
let const_fns: Vec<TraitItemFn> = const_fns
.into_iter()
.map(|item| match item {
TraitItem::Fn(trait_item_fn) => Ok(*trait_item_fn),
_ => return Err(Error::new(item.span(), "expected `fn`")),
})
.collect::<std::result::Result<_, Self::Error>>()?;
@sam0x17
sam0x17 / const_str_eq.rs
Created July 20, 2023 15:59
Rust const_str_eq
pub const fn const_str_eq(a: &str, b: &str) -> bool {
if a.as_bytes().len() != b.as_bytes().len() {
return false;
}
let mut i = 0;
while i < a.as_bytes().len() {
if a.as_bytes()[i] != b.as_bytes()[i] {
return false;
}
i += 1;