Skip to content

Instantly share code, notes, and snippets.

View connorads's full-sized avatar

Connor Adams connorads

View GitHub Profile
@connorads
connorads / download_wht.py
Last active March 3, 2026 16:05
Download StarCraft 1 unit 'wht' (first-selected) voice lines from The Sounds Resource
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "httpx",
# ]
# ///
"""Download StarCraft: Brood War unit 'wht' (What) sounds from The Sounds Resource.
Covers all units from both the original StarCraft and the Brood War expansion.
@connorads
connorads / connoradams-styling-prompt.md
Created February 6, 2026 15:04
connoradams.co.uk styling prompt — use with Claude artifacts to avoid generic AI aesthetics

Style this artifact with the following design system. Do not use generic AI purple aesthetics.

Theme: Dark, minimal, technical

  • Background: #121212
  • Text: #f5f5f5 (primary), #a1a1aa (secondary)
  • Accent: #3b82f6 (blue-500), used sparingly for interactive elements and highlights
  • Borders: rgba(255,255,255,0.1), subtle white at low opacity
  • No harsh contrasts — use opacity layering (5%, 10%, 20% white) for depth

Typography:

@connorads
connorads / .zshrc
Last active August 19, 2025 09:47
Generate a prompt to review a GitHub PR and then paste it into ChatGPT, Claude or Gemini etc.
# 🔮 Generate a prompt to review a GitHub PR and then paste it into ChatGPT, Claude or Gemini etc.
# Copy paste this into your .zshrc, restart your shell and run
# pr-prompt https://github.com/connorads/lockbot/pull/148
# But replace with a PR you want to review 👆
# You need to have the GitHub CLI installed
# brew install gh jq
# gh login
@connorads
connorads / cask.md
Created April 21, 2025 09:32
Creating homebrew casks

Creating casks

Create a cask in your local casks folder and then just copy it over to a git fork to actually commit it to homebrew-casks repository.

Install zap helper

brew tap nrlquaker/createzap
@connorads
connorads / README.md
Created September 27, 2024 15:07
Compress a .gif

Too big to upload somewhere, why not compress with gifsicle?

gifsicle --lossy=200 --scale 0.6 Screen\ Cast\ 2024-09-27\ at\ 3.59.08\ PM.gif -o compressed.gif 
@connorads
connorads / assume.md
Last active October 8, 2024 08:01
assume (granted.dev)
# Add AWS profiles in ~/.aws/config 
granted sso populate --sso-region eu-west-1 https://yourawsssosubdomain.awsapps.com/start

# Login in shell
assume

# Check who you're logged in as
aws sts get-caller-identity
@connorads
connorads / promiseWithTimeout.ts
Created September 25, 2020 10:47
Wrapping a promise with a timeout in Typescript (adapted from https://bit.ly/3j1fmli)
export class TimeoutError extends Error {
constructor(message: string) {
super(message);
this.name = "TimeoutError";
}
}
export const promiseWithTimeout = <T>({
ms,
promise,