Skip to content

Instantly share code, notes, and snippets.

View s4hubhamp's full-sized avatar
🎶

Shubham Pawar s4hubhamp

🎶
View GitHub Profile
@s4hubhamp
s4hubhamp / .zig
Created April 2, 2025 10:08
Alignments in Zig
pub fn main() !void {
// Alignment in computer programming refers to the way data is arranged and accessed in memory.
// It is a rule that specifies the memory address boundaries at which a data type or variable
// should be stored.
// The goal of alignment is to ensure that memory accesses are efficient and that the processor
// can retrieve data in the most optimized way.
// https://ziggit.dev/t/whats-up-with-alignof-u128/1271/3?u=s4hubhamp
// Definition as per Zig docs
// Each type has an alignment - a number of bytes such that, when a value of the type is loaded from or stored to memory,
@gagarine
gagarine / fish_install.md
Last active April 29, 2025 09:11
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish