Skip to content

Instantly share code, notes, and snippets.

Rust Engineering Best Practices

A complete project standard for writing correct, explicit, allocation-aware, production-grade Rust.

This document is intended to replace the previous rust-best-practices.md Gist in full. It integrates ownership, API design, error handling, testing, linting, performance, debug_assert!() usage, and heap-allocation discipline into one coherent set of rules.

Status and terminology

This is a normative engineering guide, not an introductory Rust tutorial.

@mathix420
mathix420 / medium.user.js
Last active October 7, 2026 09:12
User Script Bypass Medium / NYT / WaPo / Bloomberg / Reuters / Economist / FT/ Paywall - Working late 2026 - Click the RAW button to install
// ==UserScript==
// @name Freedium Article Redirect
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://medium.com/*
// @match *://*.medium.com/*
// @match *://nytimes.com/*
// @match *://*.nytimes.com/*
// @match *://washingtonpost.com/*
// @match *://*.washingtonpost.com/*

Each step was A/B tested against the commit just before it (requests/sec at 16 clients, median of 3–5 alternating reps). Every step had its own baseline, so the percentages don't multiply into the totals exactly. A dash means no notable change on that route.

Change Room Messages Sidebar Search Post
No Rack::Deflater, Redis compress: false, no Rack::ETag, 4 workers (measured together) +56% +52% +19% +31% +19%
Puma → Falcon +1% +3% +10% +12% +1%
Static-file checks skipped + tags once per process + Current.account once (together) +10% — +14% +14% —
Per-process fragment copies + cache versions without a DB checkout (together) +13% +20% +6% +8% —
@geohot
geohot / syllabus.md
Last active October 7, 2026 09:17
Compilers for Machine Learning

Compilers for Machine Learning

A hands-on one semester course where students build their own compiler from scratch, starting from elementwise programs and ending with training SOTA LLMs on GPUs. This course aggressively builds on the previous week, and is an exercise in slop management. If you let any slop in early, it will compound and you will not finish the class.

Course description: This course covers the design and implementation of a modern machine learning compiler, and examines the interaction between IR design, hardware capabilities, and the structure of machine learning programs. Topics covered include term rewriting, code generation, movement operators, kernel fusion, memory hierarchies, GPU architecture, automatic differentiation, and flash attention. It is a project course, providing experience with performance-oriented programming, managing a codebase that grows all semester, and working in 1 or 2 person teams, culminating in a compiler capable of training modern LLMs.

Prerequisites: This c

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.

TN3399 v3(RK3399)+ Jellyfin 硬件转码完整指南(最终实测版)

记录/修订时间:2026-09-24 本文记录 TN3399 v3 实机配置、编译过程、legacy RGA2 补丁、FFmpeg/libass 替换、Jellyfin wrapper 和最终验证结果。 文中不包含真实主机名、UUID、账号等私有信息。


目录

@shoui520
shoui520 / readmore.md
Last active October 7, 2026 09:02
Chinese Yomichan Setup

Yomitan setup for Chinese

https://learnjapanese.moe

Yomitan (formerly Yomichan) is a browser extension created for Japanese which enables its users to quickly and efficiently look up words on a webpage.
While it is made for Japanese, it is possible to use it for other languages, including Chinese.

Getting Yomitan

Yomitan is available for both Chromium and Firefox based browsers. You can find the respective versions below.

@nikoheikkila
nikoheikkila / README.md
Last active October 7, 2026 09:01
Fish Shell function for sourcing standard .env files

envsource

⚠️ NOTE (20.5.2023): I don't really use this function at all anymore since there are now tools such as Taskfile, which reads the .env file for me sparing me the need to pollute my session with environment variables.


I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

🌐 API Resources by Category

📱 Phone Number & Verification

Service URL Description Pricing
Numverify https://numverify.com Global Phone Number Validation & Lookup JSON API. Supports 232 countries. 250 requests FREE
Twillo https://www.twilio.com/docs/lookup/api Provides a way to retrieve additional information about a phone number Free or $0.01 per request (for caller lookup)
Plivo https://www.plivo.com/lookup/ Determine carrier, number type, format, and country for any phone number worldwide from $0.04 per request
GetContact https://github.com/kovinevmv/getcontact Find info about user by phone number from $6.89 in months/100 requests
@1271
1271 / gameslist.json
Created February 26, 2021 19:53
Discord Verified Games List
This file has been truncated, but you can view the full file.
[
{
"bot_public": false,
"bot_require_code_grant": true,
"cover_image": "4f0361f7957490d61da116ef6f5ae07e",
"description": "Cut-throat multiplayer running game that pits 4 players against each other, locally and/or online. Run, jump, swing around, and use devious weapons and pick-ups to knock opponents off-screen! One of the most competitive games you'll ever play.",
"developers": [
{
"id": "521816574047420417",