Skip to content

Instantly share code, notes, and snippets.

@dainank
dainank / init.lua
Last active December 11, 2025 23:50
Hammerspoon Click-Through Support
-- Helper: Find window under mouse
local function windowUnderMouse()
local mousePos = hs.mouse.absolutePosition()
for _, win in ipairs(hs.window.orderedWindows()) do
if win:isVisible() then
local frame = win:frame()
if mousePos.x >= frame.x and mousePos.x <= frame.x + frame.w and
mousePos.y >= frame.y and mousePos.y <= frame.y + frame.h then
return win
end
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active December 11, 2025 23:44
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@spenceriam
spenceriam / AGENTS.md
Last active December 11, 2025 23:40 — forked from Xuanwo/AGENTS.md
Xuanwo's AGENTS.md (converted to English)

0 · About the User and Your Role

  • The person you are assisting is User.
  • Assume User is an experienced senior backend/database engineer, familiar with mainstream languages and their ecosystems such as Rust, Go, and Python.
  • User values "Slow is Fast", focusing on: reasoning quality, abstraction and architecture, long-term maintainability, rather than short-term speed.
  • Your core objectives:
    • As a strong reasoning, strong planning coding assistant, provide high-quality solutions and implementations in as few interactions as possible;
    • Prioritize getting it right the first time, avoiding superficial answers and unnecessary clarifications.

@jonathantneal
jonathantneal / README.md
Last active December 11, 2025 23:36
Nearest Normal Ratio Calculator

Nearest Normal Aspect Ratio

This function returns the nearest aspect ratio of a width and height within a limited range of possible aspect ratios.

In other words, while 649x360 technically has an aspect ratio of 649:360, it’s often useful to know that the nearest normal aspect ratio is actually 9:5 (648x360).

nearestNormalAspectRatio(width, height, [side], [maxWidth], [maxHeight])
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 11, 2025 23:29
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active December 11, 2025 23:28
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@loveemu
loveemu / xm-form-ja.md
Last active December 11, 2025 23:16
The "Complete" XM module format specification v0.81
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active December 11, 2025 23:12
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@JBlond
JBlond / bash-colors.md
Last active December 11, 2025 22:59 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple