Skip to content

Instantly share code, notes, and snippets.

View patcoll's full-sized avatar

Pat Collins patcoll

View GitHub Profile
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:

@pmarreck
pmarreck / time_awareness_hook.md
Created June 24, 2026 02:23
Give LLM agents (Claude in this case, but may be adaptable to others) an awareness of time in an unobtrusive way.

Giving Claude Code a sense of time (rate-limited, low-noise)

A self-contained recipe. Read this one file and you can reproduce the whole mechanism from scratch — a human or another LLM, knowing nothing else.


1. The problem

An LLM agent has no clock. It only knows what is in its context window.

@TwilightZebby
TwilightZebby / editImagesWithAppsDiscord.md
Last active April 8, 2026 01:28
About the "Discord's Hidden Bots" misinformation

I've been seeing a lot of misinformation so:

Definitions of terms used here

Word Meaning
App A Bot account on Discord, always has the "APP" flair
Server App A Bot account with support to be added to Servers, so all the Server's members can use it
User App A Bot account with support to be added to User accounts, so that User can use its commands in across Servers & DMs/GroupDMs
@nathanl
nathanl / deadlock_demo.md
Created June 10, 2022 18:41
Demo of deadlocks with PostgreSQL
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active July 3, 2026 20:49
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

@olivierlemoal
olivierlemoal / event_listener.py
Last active February 17, 2021 19:48
i3 script to toggle between last windows
Moved to https://github.com/olivierlemoal/i3-swap-focus
@DoomHammer
DoomHammer / .tmux.conf
Last active May 12, 2021 23:38
An example Tmux configuration with plugins
## Prefix like in screen
set -g prefix 'C-a'
## Use xterm keys (makes eg. Ctrl+Arrow navigate words)
set-window-option -g xterm-keys on
## List of plugins
# For this to work you need to install https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
@Gorcenski
Gorcenski / fizzbuzz.py
Last active May 23, 2022 23:55
The most obnoxious solution to FizzBuzz I can imagine.
import numpy as np
from functools import reduce
class Buzzer:
def __init__(self, **kwargs):
values = [v for k, v in kwargs.items()]
self.kwargs = kwargs
self.lcm = np.lcm.reduce(values)
self.eps = 1e-7