Skip to content

Instantly share code, notes, and snippets.

# AGENTS.md
- Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
- Choose the simplest implementation that fully meets the current requirements. Avoid speculative abstractions, configuration, and indirection.
- Grow the system in layers. Start from the smallest version that works end to end, and add each new capability on top of a product that already works. Never trade a working product for unfinished complexity.
- Keep components modular and concerns clearly separated.
- Prefer established, well-maintained libraries when they reduce overall complexity or improve reliability. Do not reimplement common functionality without a clear reason.
- Lean on the dependencies already in the project before writing your own implementation or adding packages. Do not assume a library lacks a capability without checking its documentation and types.
- Make architectural decisions for the long term. Do not accept a stopgap that only works for now an
@shameemreza
shameemreza / add-gtin-to-quick-edit.php
Created December 8, 2025 10:52
Adds a GTIN field to the WooCommerce Quick Edit panel, allowing store managers to view and update GTIN values directly from the product list
/**
* Add GTIN Field to WooCommerce Quick Edit Panel
*
* Allows viewing and editing GTIN from the Quick Edit dropdown.
*/
/**
* Get the GTIN field label (same as product settings).
*
* @return string
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active August 3, 2026 18:59 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@justintadlock
justintadlock / register-post-type.php
Last active August 3, 2026 18:55
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@digitalsignalperson
digitalsignalperson / stream.sh
Last active August 3, 2026 18:50
xdp screen cast example, modified to pipe to ffmpeg
mkfifo /tmp/gfifo
./xdp-screen-cast-ffmpeg.py & # or run in another terminal
# Note the gstreamer pipeline
# 'pipewiresrc fd=%d path=%u ! videorate ! video/x-raw,framerate=60/1 ! videoconvert ! filesink location=/tmp/gfifo'
# I specified a 60/1 frameerate. You can do other pre-processing here, or offload it to ffmpeg.
# Encode the stream and pipe to netcat
# note: must specify correct resolution here
# we can now use h264_nvenc, mpegts, and anything else ffmpeg has
@JoeyBurzynski
JoeyBurzynski / web-design-inspiration-and-best-front-end-development-tools.md
Last active August 3, 2026 18:47
Web Design Inspiration: Best Practice, Blogs, Guides, Lists, Web Design Inspiration & Front-end Development Tools
@mperham
mperham / 1-results.txt
Last active August 3, 2026 18:47
Benchmarking sidekiq and solid_queue
## Setup
MacBookPro, M1 Pro w/ 32GB RAM, Sequoia 15.0.1
Ruby 3.3.5
Sidekiq 7.3.5
Solid Queue 1.0.2
Rails 8.0.0
## Results
@russiantux
russiantux / gamescope_4_Ubuntu24-04.md
Last active August 3, 2026 18:42
Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Due to what appears to be dependency issues, the gamescope package isn't avalible for Ubuntu 24.04. So here's a guide on how to build and install gamescope for Ubuntu 24.04

  1. Pull latest git of gamescope

$ git clone https://github.com/ValveSoftware/gamescope.git

  1. Install needed dependencies to build gamescope

`$ sudo apt install libbenchmark1.8.3 libdisplay-info1 libevdev-dev libgav1-1 libgudev-1.0-dev libmtdev-dev libseat1 libstb0 libwacom-dev libxcb-ewmh2 libxcb-shape0-dev libxcb-xfixes0-dev libxmu-headers libyuv0 libx11-xcb-dev libxres-dev libxmu-dev libseat-dev libinput-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-res0-dev libcap-dev

@jonade
jonade / Exchange-AddKeepAliveTimeoutRegistry.ps1
Last active August 3, 2026 18:39
Exchange - Add a KeepAliveTime registry value
if((Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters\' -Name 'KeepAliveTime'-EA SilentlyContinue) -Eq $Null){Write-Verbose "Adding Registry Value" -Verbose;New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters\' -Name 'KeepAliveTime' -PropertyType 'DWord' -Value 1800000}
if((Get-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\RPC\' -Name 'MinimumConnectionTimeout'-EA SilentlyContinue) -Eq $Null){Write-Verbose "Adding Registry Value" -Verbose;New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\RPC\' -Name 'MinimumConnectionTimeout' -PropertyType 'DWord' -Value 120}
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections: