Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.
| Action | Windows/Linux | macOS |
|---|---|---|
| New window | Ctrl+Shift+N | Cmd+N |
| Close window | Alt+F4 | Cmd+Shift+W |
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.
| package main | |
| import "fmt" | |
| type Update struct{} | |
| type Handler func(*Update) | |
| type Dispatcher struct { | |
| handlers []Handler | |
| } |
| 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, | |
| }; |
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 are files generated with definitions that Homebrew reads and processes, a generated
| 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 { |
| [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 |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true