Skip to content

Instantly share code, notes, and snippets.

@withakay
withakay / index.html
Created February 17, 2026 20:22
Network N — Interactive 3D Wireframe | Three.js + GSAP + CRT GLSL Shader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Network N — Interactive 3D Wireframe</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #0a0a1a;
@withakay
withakay / .envrc
Created February 3, 2026 14:49
Direnv / bash / zsh config to use standard ssh-agent when being accessed over ssh
# direnv config for remote shells
#
# When logged in over SSH (no Touch ID), bypass 1Password's SSH agent for GitHub
# by forcing git's SSH to use a user-level remote config (password-based, no biometric).
# Also disable git commit signing since it requires 1Password agent.
if [ -n "${SSH_CONNECTION-}" ] || [ -n "${SSH_CLIENT-}" ] || [ -n "${SSH_TTY-}" ]; then
export SSH_AUTH_SOCK="$HOME/.ssh/ssh-agent.sock"
if ! ssh-add -l >/dev/null 2>&1; then
@withakay
withakay / README.md
Last active January 26, 2026 14:22
Github Copilot Usage CLI

ghcp-usage

View your Github Copilot usage from the CLI

Requirements

  • Python3 - should work with just about any Python sunce 3.6
  • gh cli installed and authed - we use the gh cli auth token to fetch the usage data

Install

@withakay
withakay / README.md
Last active September 14, 2025 13:07
Ubuntu Update

The Ubuntu Update Script

A comprehensive Ubuntu update script

. Get the Raw URL:

  • After creating, click on the "Raw" button
  • Copy the URL (it will look like: https://gist.githubusercontent.com/YOUR_USERNAME/GIST_ID/raw/ubuntu-update.sh)

One-Line Commands to Run

@withakay
withakay / worktree-fzf-cd.sh
Created August 19, 2025 14:56
Switch git work trees interactively with fzf
# include this in your .bash_profile or .zshrc or similar
# Note: you can't put this in script and call it as `cd` will only affect
# the subshell the script runs in
function wtcd () {
local dir
dir=$(git wtl --porcelain | grep "^worktree" | awk '{print $2}'| fzf \
--height=40% \
--layout=reverse \
--border \
@withakay
withakay / gha-output.sh
Created August 12, 2025 13:47
gha-output.sh - Bash script with helper methods for writing output in GitHub Actions
#!/usr/bin/env bash
# GitHub Actions output and summary helpers
# Version: 2.0.0
# Source common functions if not already loaded
if [[ -z "${SCRIPT_DIR:-}" ]]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
fi
# Source common.sh if functions not available
@withakay
withakay / README.md
Last active July 25, 2025 18:24
Private browser based VS Code on Ubuntu, Tailscale using coder-server

coder-server: Remote browser based VS Code on Ubuntu with Tailscale

Warning: This is a tl:dr; YYMV, RTFM, use at your own risk etc.

Requirements

  • Ubuntu 24.04
  • Tailscale installed with MagicDNS and HTTPS enabled.

Install Coder

@withakay
withakay / README.md
Last active June 7, 2025 15:56
Use Claude Code to improve your last git commit message

Git Commit Message Improver

A powerful bash script that uses Claude CLI to automatically improve generic or poorly written git commit messages. It analyses your code changes and suggests more descriptive, conventional commit messages.

Features

  • 🤖 AI-Powered: Uses Claude to analyse your changes and generate meaningful commit messages
  • 📝 Smart Detection: Automatically identifies generic commit messages like "update", "fix", "changes"
  • 🔄 Batch Processing: Can improve all unpushed commits on your current branch
  • Model Selection: Choose between different Claude models for speed vs quality
@withakay
withakay / rectangle-pro-cycle-layouts.zsh
Last active January 2, 2025 15:23
Cycle layouts in Rectangle Pro
#!/usr/bin/env zsh
# Rectangle Pro Layout Cycler
# This script cycles through predefined Rectangle Pro window manager layouts.
# It supports multiple layout groups and maintains state between invocations.
# It uses `open -g "rectangle-pro://execute-layout?name=<<layout>>` to activate Layouts.
#
# Edit the layout_groups variable to suit your needs and then use a 3rd party tool map
# a key command to invoke the script. (I am using Alfred, but there are loads of options
# like skhd, hammerspoon, Keyboard Maestro and more I am sure
@withakay
withakay / dircolors.sh
Created December 21, 2024 09:49
dircolors generator
#!/usr/bin/env bash
# A 'theme' generator for dircolors, tested on macOS Sequoia 15.1 and bash 5, should work elsewhere by YMMV
# On macOS you will need gdirecolors and a modern bash, installed via brew
#
# brew install coreutils
# brew install bash
#
# Adjust the colors below and run ./dircolors.sh > ~/.dircolors to create a dircolors 'theme'
# in your .zshrc (probably .bashrc too) you can eval this file (also export CLICOLOR=1)
#