Skip to content

Instantly share code, notes, and snippets.

@dholbrook
dholbrook / Tree.scala
Created June 21, 2012 17:59
Scala binary tree
/**
* D Holbrook
*
* Code Club: PO1
*
* (*) Define a binary tree data structure and related fundamental operations.
*
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported:
*
* Constructors
@mubix
mubix / infosec_newbie.md
Last active August 5, 2026 19:50
How to start in Infosec
@kmobs
kmobs / USBIP Guide.md
Last active August 5, 2026 19:49
USB/IP for passing a Steam Controller 2 between Windows devices

Guide: Passing the Steam Controller 2 to a Sunshine Host via USB/IP (Windows to Windows)

I recently managed to get my Steam Controller seamlessly passed back and forth between my Windows Moonlight client and my Windows Sunshine host. While this is arguably easier with a Linux client, I don't want my Moonlight PC running Linux right now.

Why not VirtualHere? I have no problem paying $50 for good software, but I don't like their licensing practices—specifically, the fact that the license isn't easily transferable between devices.

If you want a free, network-based USB passthrough solution for the SC2, here is my process using usbip-win2, usbipd-win, and OpenSSH.

Prerequisites

@ImKaptain
ImKaptain / Kaptain_Mega_Nuvio_Native_0.61.json
Created May 26, 2026 00:53
Official Mega Collection for Nuvio by Kaptain. v0.61. Updated 5/25
[
{
"id": "collection-UGED6TEZ",
"title": "Trending / New",
"folders": [
{
"id": "folder-9D1C5A0D",
"title": "New Movies",
"sources": [
{
@mberman84
mberman84 / all_files.md
Created February 24, 2026 21:09
Matt's Markdown Files

OpenClaw: System Prompt File Templates

Generalized versions of all root .md files used by OpenClaw. These files are loaded into the agent's system prompt on every request (except MEMORY.md which is conditional).

Copy these as starting points and customize for your own setup. Replace <placeholders> with your values.


AGENTS.md

@monfresh
monfresh / fers_contribution_refund_guide.md
Last active August 5, 2026 18:53
Guide to getting your FERS contribution refund for former 18F employees

For best results, all forms mentioned below must be printed out, filled out and signed in ink, and mailed directly to OPM at the following address:

U.S. Office of Personnel Management
Attn: Federal Employee Retirement System 
Post Office Box 45
Boyers, PA 16017-0045

In order to send directly to OPM, you must wait 30 days after your last day at GSA. However, because part of the process requires you to mail some forms to your financial institution and wait for them to send them back, you can start the process about 15 days after your last day.

@kalsan
kalsan / method_accessible_hash.rb
Last active August 5, 2026 18:15
MethodAccessibleHash, a possible replacement for OpenStruct
# OpenStruct has caveats and security problems and even leads to a rubocop offense:
# https://ruby-doc.org/stdlib-3.1.0/libdoc/ostruct/rdoc/OpenStruct.html#class-OpenStruct-label-Caveats
# https://msp-greg.github.io/rubocop/RuboCop/Cop/Style/OpenStructUse.html
#
# It's time to replace it. The feature I loved most about OpenStruct was being able to retrieve
# values by calling a method instead of having to use hash access syntax.
# The recommended way to go is Struct, but it is much more cumbersome than OpenStruct was.
# So here's MethodAccessibleHash that allows to do that, but without OpenStruct's security problems.
#
# This revision adds writers, direct creation from Hash, as well as enhanced merging.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.