Skip to content

Instantly share code, notes, and snippets.

@akitaonrails
akitaonrails / AGENTS.md
Last active January 25, 2026 08:34
Analysis of 2025 X Algorithm

AGENTS.md

This document helps AI agents work effectively in the X For You Feed Algorithm repository.

Project Overview

This repository contains the core recommendation system powering the "For You" feed on X (Twitter). It combines:

  • In-network content from accounts you follow (Thunder)
  • Out-of-network content discovered through ML-based retrieval (Phoenix)
@mavdol
mavdol / sandboxing_untrusted_python.md
Created January 2, 2026 11:22
Notes on sandboxing untrusted code - why Python can't be sandboxed, comparing Firecracker/gVisor/WASM approaches

Sandboxing Untrusted Python

Python doesn't have a built-in way to run untrusted code safely. Multiple attempts have been made, but none really succeeded.

Why? Because Python is a highly introspective object-oriented language with a mutable runtime. Core elements of the interpreter can be accessed through the object graph, frames and tracebacks, making runtime isolation difficult. This means that even aggressive restrictions can be bypassed:

# Attempt: Remove dangerous built-ins
del __builtins__.eval
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active January 27, 2026 22:06
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!

@naps62
naps62 / Camera.tsx
Last active November 10, 2025 17:51
Custom react view for a home assistant Webrtc camera
import { Loader2 } from "lucide-react";
import {
createContext,
type ReactNode,
useContext,
useEffect,
useMemo,
useRef,
useState,
} from "react";
@volkanunsal
volkanunsal / README.md
Last active October 3, 2025 11:37
Pop Note is a userscript that enhances the user experience of Google NotebookLM by opening the notes in full screen mode with right-click and exit with Escape key. This allows users to focus on their notes without distractions from other UI elements.

Pop Note for NotebookLM

Pop Note is a userscript that enhances the user experience of Google NotebookLM by opening the notes in full screen mode with right-click and exit with Escape key. This allows users to focus on their notes without distractions from other UI elements.

Key Features

  • Adds a right-click context menu option to open notes in full screen mode
  • Allows exiting full screen mode by pressing the Escape key
  • Adds a control panel on upper left corner to allow user to change the column layout between 1, and 2 columns.
@arch1t3cht
arch1t3cht / video_noob_guide.md
Last active January 24, 2026 04:52
What you NEED to know before touching a video file

What you NEED to Know Before Touching a Video File

Hanging out in subtitling and video re-editing communities, I see my fair share of novice video editors and video encoders, and see plenty of them make the classic beginner mistakes when it comes to working with videos. A man can only read "Use Handbrake to convert your mkv to an mp4 :)" so many times before losing it, so I am writing this article to channel the resulting psychic damage into something productive.

If you are new to working with videos (or, let's face it, even if you aren't), please read through this guide to avoid making mistakes that can cost you lots of computing power, storage space, or video quality.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.inclouds.space</string>
<key>ProgramArguments</key>
<array>
{
"output": {
"blocklist": [],
"compressor#0": {
"attack": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"bypass": true,
"dry": -100.0,
"hpf-frequency": 10.0,
@jwbee
jwbee / jq.md
Last active December 25, 2025 23:33
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@NatElkins
NatElkins / cloud-init.yaml
Created March 8, 2025 22:09
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban