Skip to content

Instantly share code, notes, and snippets.

@scpedicini
scpedicini / CLAUDE.md
Created November 30, 2025 21:27
Full CLAUDE.md Sample File

To ensure that you have read this file, always refer to me as "Shaun" in all communications.

Best Practices

  • Prefer smaller separate components over larger ones.
  • Prefer modular code over monolithic code.
  • Use existing code style conventions and patterns.
  • Prefer types over interfaces.

Tech Stack

@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active December 6, 2025 16:17
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@polyfjord
polyfjord / batch_reconstruct.bat
Created August 3, 2025 10:51
Batch script for automated photogrammetry tracking workflow
:: ================================================================
:: BATCH SCRIPT FOR AUTOMATED PHOTOGRAMMETRY TRACKING WORKFLOW
:: By polyfjord - https://youtube.com/polyfjord
:: ================================================================
:: USAGE
:: • Double-click this .bat or run it from a command prompt.
:: • Frames are extracted, features matched, and a sparse
:: reconstruction is produced automatically.
:: • Videos that have already been processed are skipped on
:: subsequent runs.
@bradleyhodges
bradleyhodges / snowflake_id.sql
Created May 24, 2025 06:15
Ultra-tuned PL/pgSQL Snowflake ID generator for Supabase Postgres. Provides 41-bit millisecond timestamps, 10-bit node IDs, and a 12-bit cached, cycling sequence entirely within a dedicated schema. No C extensions required.
-- Create separate schema for Snowflake logic. See: https://supabase.com/docs/guides/database/extensions?queryGroups=database-method&database-method=dashboard#enable-and-disable-extensions#:~:text=To%20avoid%20namespace%20pollution,%20we%20do%20not%20recommend%20creating%20other%20entities%20in%20the%20extensions%20schema.
CREATE SCHEMA IF NOT EXISTS snowflake_ext;
-- High-performance 12-bit sequence
CREATE SEQUENCE IF NOT EXISTS snowflake_ext.sequence_12bit
AS BIGINT
START 0
INCREMENT 1
MINVALUE 0
MAXVALUE 4095
@ipenywis
ipenywis / cursor-memory-bank-rules.md
Last active December 6, 2025 00:13
Cursor Memory Bank

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@t3dotgg
t3dotgg / try-catch.ts
Last active November 30, 2025 20:25
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@awni
awni / mlx_distributed_deepseek.md
Last active December 2, 2025 06:50
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

<?php declare(strict_types = 1);
namespace App\Tests;
use Closure;
use PHPUnit\Framework\Assert;
use ReflectionClass;
use ReflectionFiber;
use ReflectionFunction;
use ReflectionGenerator;
@majkinetor
majkinetor / collection.bru
Last active November 21, 2024 08:31
bruno auto login and refresh every 10 minutes
script:pre-request {
const { login } = require('./utils')
await login(req)
}