Skip to content

Instantly share code, notes, and snippets.

View kolektiv's full-sized avatar
💭
Building myself a secondary brain...

Andrew Cherry kolektiv

💭
Building myself a secondary brain...
View GitHub Profile
@davidbarsky
davidbarsky / SKILL-1.md
Last active June 14, 2026 16:38
my Claude skills for authoring Rust. See the first comment for installation instructions!
name rustdoc
description Rust documentation conventions (RFC 1574). Apply when writing doc comments on public Rust items. Covers summary sentences, section headings, type references, and examples.

Rust Documentation Conventions (RFC 1574)

Apply these rules when writing doc comments (///) on public Rust items.

Summary Sentence

//! process input from mic with fundsp
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
use cpal::{FromSample, SizedSample};
use fundsp::hacker32::*;
use crossbeam_channel::{bounded, Receiver, Sender};
#[derive(Clone)]
@TACIXAT
TACIXAT / fmt-sexp.py
Last active May 15, 2025 02:54
Format Python Tree Sitter S-Expression
"""Formats an sexpression for pretty printing."""
def format_sexpression(s, indent_level=0, indent_size=4):
"""ChatGPT + TACIXAT"""
output = ""
i = 0
# Initialize to False to avoid newline for the first token
need_newline = False
cdepth = [] # Track colons
while i < len(s):
@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 7, 2025 18:42
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@mythz
mythz / ServiceStack_FilesService.cs
Created December 27, 2011 04:49
ServiceStack RestFiles vs WCF Web APIs port
/*
Contains the file manager implementation of ServiceStack's REST /files Web Service:
Demo: http://www.servicestack.net/RestFiles/
GitHub: https://github.com/ServiceStack/ServiceStack.Examples/
*/
using System;
using System.IO;
using System.Net;
using RestFiles.ServiceInterface.Support;
@ademar
ademar / gist:1016874
Created June 9, 2011 14:49
Combinators for logic programming
// Based on the article 'Combinators for logic programming' by Michael Spivey and Silvija Seres.
let rec inf_seq n = seq { yield n; yield! inf_seq (n+1) }
let rec lzw f l1 l2 =
LazyList.delayed ( fun () ->
match l1,l2 with
|LazyList.Nil, _ -> l2
|_, LazyList.Nil -> l1
|LazyList.Cons(p1,tail1),LazyList.Cons(p2,tail2)
// Worth noting that restrictions prevented me from accessing libraries like the Apache Commons Guid and others
// Also, not production code - needs some TLC & refactoring love
// If I get time will be moved to a proper home in GitHub
package semeosis.eventsourcing.infrastructure;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
open System
open System.Collections.Generic
type IMonoid<'T> =
abstract member mempty : unit -> 'T
abstract member mappend : 'T * 'T -> 'T
type MonoidAssociations private() =
static let associations = new Dictionary<Type, obj>()
static member Add<'T>(monoid : IMonoid<'T>) = associations.Add(typeof<'T>, monoid)