Skip to content

Instantly share code, notes, and snippets.

View InSuperposition's full-sized avatar

Forrest Galloway InSuperposition

View GitHub Profile

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@danmack
danmack / nix-alpine.org
Last active March 10, 2026 19:04
install NIX package manager on Alpine Linux

NIX Package Manager Install on Alpine Linux

System Information

  • alpine 3.17.1, 3.18, 3.19 and edge x86-64
  • multiple linux kernels worked 6.1.8-lts w/zfs and 6.6.8-lts
  • edge, testing apk repos enabled

Preparation

@ssrihari
ssrihari / clojure-learning-list.md
Last active March 10, 2026 12:56
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
package main
import "fmt"
type Update struct{}
type Handler func(*Update)
type Dispatcher struct {
handlers []Handler
}
@andrewrk
andrewrk / global_allocator_example.zig
Created June 3, 2022 00:09
a pattern using comptime fields that might be nice for applications that want to use a global allocator
const std = @import("std");
var gpa_instance: std.heap.GeneralPurposeAllocator(.{}) = .{};
const global_allocator = gpa_instance.allocator();
const S = struct {
comptime gpa: std.mem.Allocator = global_allocator,
x: i32,
};
@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active February 10, 2026 19:33
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.

If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.

Brewfiles

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@andrewrk
andrewrk / adapted_hash_maps.zig
Last active February 14, 2026 17:04
how to use hash map contexts to save memory when doing a string table
const std = @import("std");
const mem = std.mem;
const Foo = struct {
string_bytes: std.ArrayListUnmanaged(u8),
/// Key is string_bytes index.
string_table: std.HashMapUnmanaged(u32, void, IndexContext, std.hash_map.default_max_load_percentage),
};
const IndexContext = struct {
@andrewrk
andrewrk / output.txt
Created July 3, 2021 23:49
benchmarking the zig tokenizer
[nix-shell:~/Downloads/zig/build-release]$ ./zig build-exe test.zig -OReleaseFast
[nix-shell:~/Downloads/zig/build-release]$ ls -hl ../lib/std/special/compiler_rt/udivmod{t,d}i4_test.zig test.zig
-rw-r--r-- 1 andy users 1.9M May 10 21:29 ../lib/std/special/compiler_rt/udivmoddi4_test.zig
-rw-r--r-- 1 andy users 9.8M May 10 21:29 ../lib/std/special/compiler_rt/udivmodti4_test.zig
-rw-r--r-- 1 andy users 1.2K Jul 3 16:46 test.zig
[nix-shell:~/Downloads/zig/build-release]$ ./test test.zig
tokenizer: 25 MiB/s
@davidteren
davidteren / nerd_fonts.md
Last active February 20, 2026 23:40
Install Nerd Fonts via Homebrew [updated & fixed]