Skip to content

Instantly share code, notes, and snippets.

View axelhamil's full-sized avatar
🥖

AxelHamil axelhamil

🥖
View GitHub Profile
@axelhamil
axelhamil / rasp_pi__zero_config_from_scratch.md
Last active November 19, 2025 00:06
🚀 Raspberry Pi Zero 2 W – Headless Setup Guide (with Static IP) and Pi Hole

Raspberry Pi OS SSH Ready

A quick and clean guide to set up your Raspberry Pi Zero 2 W headlessly with Wi-Fi, SSH, and a static IP – perfect for IoT and embedded projects.


🧰 Requirements

@axelhamil
axelhamil / macos_config_from_scratch.md
Last active August 5, 2025 14:35
MacOS config from scratch

⚙️ macOS Dev Environment Setup

A clean and pragmatic guide to setting up a modern development environment on macOS, including:

  • 🧃 Homebrew
  • 🐱 Kitty terminal
  • 🔐 Git + GitHub over SSH with signed commits
  • 🧩 Dotfiles management using GNU Stow

@axelhamil
axelhamil / result.ts
Last active July 2, 2025 23:07
Rust-inspired Result Type for TypeScript
/**
* Represents the result of an operation, which can be either a success or a failure.
* This pattern is useful for explicit error handling and chaining operations.
* @template T The type of the value on success.
* @template E The type of the error on failure (default: string).
*/
export class Result<T, E = string> {
/**
* Indicates if the result is a success.
*/
@axelhamil
axelhamil / option.ts
Last active July 2, 2025 23:07
Rust-inspired Option Type for TypeScript
/**
* Implementation of Rust-like Option type in TypeScript
*/
export abstract class Option<T> {
/**
* Returns true if the option is a Some value
*/
abstract isSome(): boolean;
/**
@axelhamil
axelhamil / ReactLike.md
Last active June 24, 2025 20:41
Mini ReactTree in TypeScript: Typed Components to Render HTML
type NodeReactLike = {
  tag: string;
  attrs: Record<string, string>;
  children: NodeReactLike[];
  text: string | null;
};

const El = (
  tag: string,