Skip to content

Instantly share code, notes, and snippets.

View whomwah's full-sized avatar

Duncan Robertson whomwah

View GitHub Profile
@whomwah
whomwah / AGENTS.md
Created November 10, 2025 10:29
Global Developer Guidelines [ai, copilot, claude, opencode]

Senior Engineer Guidelines

Core Principles

  • Clarity > cleverness. Explicit > implicit. Maintainability first.
  • Use standard library before adding dependencies.
  • Make it work → make it right → make it fast.
  • Ship practical solutions over theoretical perfection.

Problem-Solving

  1. Check standard library/existing code first
@whomwah
whomwah / README.md
Last active October 10, 2025 15:10
A bash script that creates clean, markdown-formatted summaries of commits between main and your current branch - perfect for pull request descriptions and release notes.

Git Branch Summary Generator

A bash script that creates clean, markdown-formatted summaries of commits between main and your current branch - perfect for pull request descriptions and release notes.

Setup & Usage

  1. Save as summary-git in your ~/bin or another directory in your $PATH
  2. Make executable: chmod +x summary-git
  3. Run from any git repository: summary-git
@whomwah
whomwah / mopidy.d.ts
Last active November 2, 2022 13:24
Type definitions for Mopidy.js
// Type definitions for Mopidy.js v1.1.0, Mopidy v3.0.2 WebSocket API
// Project: https://github.com/mopidy/mopidy.js
// Definitions by: Alan Norbauer <https://alan.norbauer.com>
// Duncan Robertson <https://github.com/whomwah>
export = Mopidy
declare class Mopidy {
// ----------------- MOPIDY.JS-SPECIFIC API -----------------
@whomwah
whomwah / server.tsx
Last active November 11, 2022 23:47
Deno / React example
// @deno-types="https://deno.land/x/types/react/v16.13.1/react.d.ts"
import React from "https://dev.jspm.io/[email protected]";
// @deno-types="https://deno.land/x/types/react-dom/v16.13.1/server.d.ts"
import ReactDOMServer from "https://dev.jspm.io/[email protected]/server";
import { opine } from "https://deno.land/x/[email protected]/mod.ts"
export {
Request,
Response,
NextFunction,
} from "https://deno.land/x/[email protected]/src/types.ts";
@whomwah
whomwah / README.md
Created January 29, 2020 09:57
[TMUX] #tmux

Start new session with name

tmux new -s mysession

Attach to existing session

tmux a -t mysession

Attach to last session

tmux a

List sessions

@whomwah
whomwah / docker.md
Last active June 19, 2019 09:43
[Docker] useful commands #docker

Execute an interactive bash shell on the container

docker exec -it app-accounting bash

Remove unused volumes

$ docker volume rm (docker volume ls -q -f dangling=true)

Remove all images

@whomwah
whomwah / gist:2018051
Last active April 11, 2019 08:06
xattr OSX privs

Use the xattr command. You can inspect the extended attributes:

$ xattr s.7z
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine
and use the -d option to delete one extended attribute:

$ xattr -d com.apple.quarantine s.7z
$ xattr s.7z
@whomwah
whomwah / README.md
Last active February 15, 2025 10:51
[unix] #unix #ssh

Manually setting the date and time

$ sudo date MMDDhhmmYYYY

MM - Two digit month number
DD - Two digit date
hh - Two digit 24 hour system hour
mm - Two digit minute
YYYY - Four digit year code