Skip to content

Instantly share code, notes, and snippets.

View walteh's full-sized avatar

Walter Scott walteh

View GitHub Profile
@walteh
walteh / smart-history.plugin.zsh
Created April 14, 2025 13:02
smart-history.plugin.zsh - a history plugin that makes life easy
# https://zsh.sourceforge.io/Doc/Release/Options.html
# https://postgresqlstan.github.io/cli/zsh-history-options
# https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh
setopt EXTENDED_HISTORY # include timestamp
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt HIST_BEEP # beep if attempting to access a history entry which isn’t there
setopt HIST_FIND_NO_DUPS # do not display previously found command
setopt HIST_IGNORE_DUPS # do not save duplicate of prior command
setopt HIST_NO_STORE # do not save history commands
@walteh
walteh / aliasrc.plugin.zsh
Last active April 14, 2025 13:00
zsh-plugin-aliasrc - dynamic project specific aliases for cli commands
##############################################
# aliasrc - Directory-specific command aliases
#
# This plugin enables directory-specific command aliases by looking
# for executable files in a .aliasrc directory in the current directory
# or any parent directory. When found, commands that match executable
# names in that directory will be replaced with the path to the executable.
##############################################
# Load required zsh modules
@thomasbachem
thomasbachem / Open in Google Meet Chrome App.md
Last active February 19, 2026 22:36
Always open Google Meet links in Google Meet Chrome app on macOS

Open Google Meet links in Google Meet Chrome app on macOS by default

I you prefer to have Google Meet links automatically open in the official Google Meet Chrome app on Mac with its own Dock icon instead of in a browser tab, this is the way to go:

Step 1: Setup Chrome App

Install the official Google Meet Chrome web app by:

  1. Navigating to meet.google.com
  2. Then either clicking on the install icon (computer screen with downward arrow) in Chrome's address bar or on "" ▸ "Save and share""Install page as app"

Step 2: Create AppleScript Proxy App

@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active June 7, 2026 12:25
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.

@JacobWeisenburger
JacobWeisenburger / zustandCustomPersistStorageTemplate.ts
Created March 31, 2023 16:16
Zustand custom persist storage template
import { createStore } from 'zustand'
import { persist, StorageValue } from 'zustand/middleware'
const store = createStore(
persist(
() => ( {} ),
{
name: 'store-state',
storage: {
async getItem ( name: string ): StorageValue<unknown> {
@topfunky
topfunky / add-mozilla-public-license.sh
Created August 16, 2021 17:57
Add Mozilla Public License
#!/usr/bin/env sh
# Download the Mozilla Public License 2.0 and commit it to the current repository.
#
# Author: Geoffrey Grosenbach <geoffrey@hashicorp.com>
# Date: August 16, 2021
curl https://www.mozilla.org/media/MPL/2.0/index.48a3fe23ed13.txt -o LICENSE.txt
git add LICENSE.txt
@davesilva
davesilva / virt-manager-macos.md
Created August 14, 2020 11:50
Remote virt-manager from Mac OS

If you have a Linux machine with KVM on it, you can manage those VMs remotely from a Mac using virt-manager.

Step 1: Allow your user non-root access to KVM

SSH to the Linux machine and add your SSH user to the libvirt group

sudo usermod -a -G libvirt $(whoami)
@jakob-stoeck
jakob-stoeck / brew-upgrade-parallel.sh
Last active June 25, 2025 12:32
homebrew parallel download and update
brew outdated | parallel --keep-order brew fetch --deps && brew upgrade
# without GNU parallel (output will be out of order):
brew outdated -q | xargs -L1 -P8 brew fetch --deps
@marcojahn
marcojahn / conventional-commit-regex.md
Last active May 22, 2026 13:18
Conventional Commit Regex

the following regex will validate all examples provided here: https://www.conventionalcommits.org/en/v1.0.0/

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)

a grep/posix compatible variant

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([[:alnum:]._-]+\))?(!)?: ([[:alnum:]])+([[:space:][:print:]]*)
@bollwyvl
bollwyvl / LICENSE
Last active May 29, 2026 09:52
Towards a JSON Schema for the Language Server Protocol
Copyright 2019 dead pixels collective
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.