Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 16:14 (UTC +10:00)
View GitHub Profile

Zsh Opinionated - A Guide to Best Practices

  • Abstract: This guide provides best practices for writing clear, maintainable, and robust Zsh scripts. Aimed at helping developers transition from Bash to Zsh, particularly on macOS, this guide offers practical advice and examples for creating standardized and efficient scripts.

  • Copyright This text of this guide is Copyright ©️2024 by Christopher Allen, and is shared under spdx:CC-BY-SA-4.0 open-source license. All the example code is relenquished to the public domain under spx:CC0-1.0.

  • Tags: #zsh #scripting #cli #opinionated

#!/bin/sh
declare -r LINE_NUMBER_PANE_WIDTH=3
declare -r LINE_NUMBER_UPDATE_DELAY=0.1
declare -r COLOR_NUMBERS_RGB="101;112;161"
declare -r COLOR_ACTIVE_NUMBER_RGB="255;158;100"
open_line_number_split(){
local self_path=$(realpath $0)
local pane_id=$(tmux display-message -pF "#{pane_id}")
@mvandermeulen
mvandermeulen / SKILL.md
Created June 1, 2026 00:52 — forked from sychou/SKILL.md
Claude skill for a poor man semantic search built for Obsidian vaults
name semantic-search
description Search the vault using semantic query expansion and intelligent result ranking. Use when the user asks questions about vault contents, searches for topics, or needs to find related notes.
user_invocable true

Semantic Search Skill

Search using LLM-powered query expansion and intelligent result synthesis. No vector database required.

@mvandermeulen
mvandermeulen / SKILL.md
Created June 1, 2026 00:52 — forked from hyfdev/SKILL.md
ast-grep-search
name ast-grep-search
description Syntax-aware code searching that understands code structure rather than just text patterns. Always prefer ast-grep than grep for code searches.
allowed-tools Read, Grep, Bash(ast-grep:*), Bash(sg:*)

ast-grep: Structural Code Search

ast-grep allows searching code based on its Abstract Syntax Tree (AST), enabling syntax-aware pattern matching. It is ideal for finding function calls, method invocations, variable declarations, and other code structures while respecting language syntax.

@mvandermeulen
mvandermeulen / CLAUDE.md
Created June 1, 2026 00:52 — forked from pmarreck/CLAUDE.md
My current AGENTS/CLAUDE.md

Agent Briefing

Bit about me: <redacted personal info that is easily googleable anyway lol>

Your role: Functional, TDD-first, curiosity-prodding developer who balances correctness, performance, and clarity. Act as a precise pair programmer; when tradeoffs arise, list brief pros/cons and pause for direction.

Important: Refer to me as "Peter" in conversation, not "the user".

Curiosity cue: after each reasoning step, ask yourself: “What am I missing? What are the alternative designs? What could break, or be broken into? How might this be simpler or more concise?”

Work Rhythm

@mvandermeulen
mvandermeulen / terminal-megaprompt
Created June 1, 2026 00:52 — forked from andrewgcodes/terminal-megaprompt
megaprompt for terminal from scratch
DEVELOPER TASK SPEC (FOR DEVIN)
Project: Build a real Linux terminal emulator “from scratch” inside repo andrewgcodes/mochi.
Goal: A genuine VT/xterm-style terminal emulator that runs a real shell/apps via a PTY, correctly parses escape sequences, maintains a screen model, and renders a GUI. No wrapping an existing terminal widget/library/implementation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0) NON-NEGOTIABLE RULES (READ FIRST)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R0.1 — No cheating / no “terminal emulator libraries”
- You MUST NOT depend on any library that implements terminal emulation, ANSI/VT parsing, or screen-model logic for you.
- Examples of forbidden dependencies (non-exhaustive):
[[Snippets]]
Description = "repeat the previous command"
Output = ""
Tag = []
command = "!!"
[[Snippets]]
Description = "Runs last command"
Output = ""
[colors.bright]
black = "0x7f7f7f"
blue = "0x5c5cff"
cyan = "0x00ffff"
green = "0x00ff00"
magenta = "0xff00ff"
red = "0xff0000"
white = "0xffffff"
yellow = "0xffff00"
@mvandermeulen
mvandermeulen / SmartPick.lua
Created June 1, 2026 00:52 — forked from suliatis/SmartPick.lua
Enhanced file and buffer picker with intelligent highlighting
--- SmartPick - Enhanced file and buffer picker with intelligent highlighting
--- ==========================================================================
---
--- A unified file/buffer picker for Neovim that combines buffer and file search
--- into one intelligent interface. Built on mini.nvim ecosystem (mini.pick).
---
--- ## Problem It Solves
--- - Eliminates "picker paralysis" - no more choosing between buffer vs file picker
--- - Shows everything in one list: buffers (by recency) → files (alphabetically)
---
@mvandermeulen
mvandermeulen / fzf-advanced.md
Created June 1, 2026 00:51 — forked from neverkas/fzf-advanced.md
Command-line fuzzy finder - Advanced examples

Advanced fzf examples

  • Last update: 2023/02/15
  • Requires fzf 0.38.0 or above