Skip to content

Instantly share code, notes, and snippets.

@kahunamoore
kahunamoore / gist:bd201fe98bce112fd8abd123d45b16e9
Last active March 8, 2026 18:30
Federated Co-op Source Network Trust Architecture

Integrating trust into ATProto cooperative governance

TrustNet plus Semaphore on ATProto custom lexicons is the most practical foundation for CSN V5's trust network, combining subjective multi-dimensional trust scores, anonymous ZK-based voting, and verifiable append-only audit logs — all implementable in your TypeScript/Express/PostgreSQL stack without blockchain dependencies. The ATProto ecosystem's lexicon extensibility, labeler infrastructure, and January 2026 DID:PLC streaming API provide the protocol-level primitives needed to make trust a first-class citizen of the federated network. Real-world cooperative governance patterns and hard lessons from fediverse trust systems (SourceCred's collapse, The Bad Space controversy, IFTAS's funding crisis) point toward a tiered, human-in-the-loop trust architecture where algorithmic scores inform but never replace democratic membership decisions.


Trust algorithms that fit cooperative-scale networks

For a platform serving 50–5,000 members, two comp

@kahunamoore
kahunamoore / MarchingCubesBlobParams.h
Created August 20, 2025 20:59 — forked from Matt54/MarchingCubesBlobParams.h
RealityKit Marching Cubes Blob (Metal + LowLevelMesh)
#ifndef MarchingCubesBlobParams_h
#define MarchingCubesBlobParams_h
#include <simd/simd.h>
typedef struct {
simd_float3 center;
float radius;
} Sphere;
@kahunamoore
kahunamoore / lein-m1-vs-intel.md
Created March 19, 2022 08:35 — forked from hagmonk/lein-m1-vs-intel.md
Benchmarking Leiningen on Apple Silicon

Benchmarking Leiningen on Apple Silicon

Gene was tweeting about Clojure's startup performance on Apple Silicon, so I decided to benchmark my new MacBook Air with the M1 chip against my Intel based MacBook Pro.

TL;DR

img

The M1 chip in the MacBook Air - which lacks a fan - was able to quite tidily beat an almost top-of-the-line Intel chip.

@kahunamoore
kahunamoore / CollDetect.cpp
Created February 20, 2020 06:36 — forked from mlfarrell/CollDetect.cpp
Vertical (Wall) Coll Detect
/*** Not optimized or perfect, but hopefully helps someone else learn **/
//https://gamedev.stackexchange.com/questions/96459/fast-ray-sphere-collision-code
static bool intersectRaySegmentSphere(float3 o, float3 d, float3 so, float radius2, float3 &ip)
{
//we pass in d non-normalized to keep it's length
//then we use that length later to compare the intersection point to make sure
//we're within the actual ray segment
float l = d.length();
d /= l;
@kahunamoore
kahunamoore / SmoothGameCameraMovement.cs
Created February 3, 2020 15:49 — forked from IRCSS/SmoothGameCameraMovement.cs
Unity Camera Movement in Game view like Scene View with filtering
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move.
public class SmoothGameCameraMovement : MonoBehaviour
{
@kahunamoore
kahunamoore / main.py
Created June 4, 2019 00:16 — forked from khanhnamle1994/main.py
FCN - Full Code
#--------------------------
# USER-SPECIFIED DATA
#--------------------------
# Tune these parameters
num_classes = 2
image_shape = (160, 576)
EPOCHS = 40
BATCH_SIZE = 16
@kahunamoore
kahunamoore / Player.jsx
Created April 17, 2019 15:48 — forked from vincentriemer/Player.jsx
Player code for my Apple Music clone
// @flow
import * as React from "react";
import {
View,
StyleSheet,
Image,
Animated,
TouchableOpacity,
Text,
@kahunamoore
kahunamoore / Player.jsx
Created April 17, 2019 15:47 — forked from vincentriemer/Player.jsx
Player code for my Apple Music clone
// @flow
import * as React from "react";
import {
View,
StyleSheet,
Image,
Animated,
TouchableOpacity,
Text,

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@kahunamoore
kahunamoore / tga.h
Created February 7, 2019 05:31 — forked from maluoi/tga.h
A super short and streamlined C/C++ function for writing .tga images to file! No dependencies, and no cruft.
// Copyright(c) 2019 Nick Klingensmith (@koujaku). All rights reserved.
//
// This work is licensed under the terms of the MIT license.
// For a copy of this license, see < https://opensource.org/licenses/MIT >
#pragma once
#include <stdio.h>
#include <stdint.h>