Skip to content

Instantly share code, notes, and snippets.

@tegila
tegila / ea6900.md
Last active December 18, 2025 16:49
ea6900

Downgrade your router if > 1.1.43.182871 back to 1.1.42.161129

  1. Setup local network:

ifconfig eth0 192.168.1.2 netmask 255.255.255.0

  1. Ping your router forever

ping 192.168.1.1

Start ping your router and observe when the TTL change from 100 to 64.

@grandamenium
grandamenium / generate-agent-prd.md
Created December 9, 2025 04:36
AI Coding Agent PRD Generator - Slash command for Claude Code
argument-hint description
<project-description>
Generate a comprehensive spec-driven, test-driven PRD prompt for AI coding agents

Meta-Prompt: AI Coding Agent PRD Generator

You are a meta-prompt engineer. Your task is to generate a comprehensive, production-ready PRD document that will serve as both a specification AND an executable prompt for an AI coding agent.

Project to Generate PRD For:

@bast
bast / jekyll-installation-arch.sh
Last active December 18, 2025 16:39
Jekyll installation on Arch Linux.
sudo pacman -S ruby ruby-rdoc gcc make
gem update --user-install
gem install jekyll --user-install
# finally add $HOME/.gem/ruby/2.7.0/bin to your PATH variable
@romainguy
romainguy / d_ggx.glsl
Last active December 18, 2025 16:38
D_GGX in mediump/half float
// From https://github.com/google/filament
float D_GGX(float linearRoughness, float NoH, const vec3 h) {
// Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces"
// In mediump, there are two problems computing 1.0 - NoH^2
// 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights)
// 2) NoH doesn't have enough precision around 1.0
// Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well
// However, we can do better using Lagrange's identity:

Mom Artifacts Server Setup Guide

Share HTML files, visualizations, and interactive demos publicly via Cloudflare Tunnel with live reload support.

What is it?

The artifacts server lets Mom create HTML/JS/CSS files that you can instantly view in a browser, with WebSocket-based live reload for development. Perfect for dashboards, visualizations, prototypes, and interactive demos.

Installation

@jamtur01
jamtur01 / auto-buttons.js
Last active December 18, 2025 16:21
Auto-press Skip Buttons on Plex
// ==UserScript==
// @name Trigger on Skip Forward Button Click by Adjusting Video Time
// @version 1.2
// @description Adjust video time when the Skip Forward button is clicked in the Plex player, even across episodes or media changes.
// @author James Turnbull
// @match *://*/*
// @grant none
// @license MIT
// ==/UserScript==
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active December 18, 2025 16:21
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!

library(terra)
## crs changes where it is longitudinally, this is southern hemi range for UTM
r <- rast(ext(c(1e+05, 9e+05, 11e+05, 1e+07)), res = 1e5, crs = "EPSG:32755")
plot(project(densify(as.polygons(r), 5000), "EPSG:4326"))
maps::map(add= TRUE)
@Kerryliu
Kerryliu / ugreen_truenas_led.md
Last active December 18, 2025 16:19
TrueNAS UGREEN DXP4800 Plus Status LED Guide

UGREEN DXP4800 Plus TrueNAS Status LED Guide

20240609_035951642_iOS

The following is a quick guide on getting basic status LED functionality working with TrueNAS running on the UGREEN DXP4800 Plus. Theoretically, it should work on all models (with some small revisions to the script), but I only have a DXP4800 Plus. :)

This guide is for cron job that runs a script to update the LEDs every couple minutes, but I'm sure the following can be modified for blinky LEDs as well.

Steps:

@brotchie
brotchie / main.cpp
Created July 18, 2012 06:32
Minimal C++ implementation of Functor, Monad and Maybe using c++0x variadic templates and lambda expressions.
/*
* Minimal C++ implementation of Functor, Monad and Maybe.
*
* Requires c++0x variadic templates and lambda expressions:
*
* g++ -std=c++0x main.cpp -o main
*
* fmap, monadic bind and return implementations for std::vector
* and Maybe.
*