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
@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active May 17, 2025 14:53
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 <[email protected]>
# 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)
@bollwyvl
bollwyvl / LICENSE
Last active January 29, 2025 17:22
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.
@GeorgeLyon
GeorgeLyon / Rust vs. Swift.md
Last active March 21, 2025 11:33
A list of advantages Swift has over Rust

Note This is a little out of date. Rust has made some progress on some points, however many points still apply.

Philosophy

Progressive disclosure

Swift shares Rust's enthusiasm for zero-cost abstractions, but also emphasizes progressive disclosure. Progressive disclosure requires that language features should be added in a way that doesn't complicate the rest of the language. This means that Swift aims to be simple for simple tasks, and only as complex as needed for complex tasks.

The compiler works for you

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 18, 2025 02:45
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule