Skip to content

Instantly share code, notes, and snippets.

View bradhanson's full-sized avatar

Bradley Hanson bradhanson

  • Los Angeles, CA
  • 03:33 (UTC -07:00)
View GitHub Profile
@bradhanson
bradhanson / tree.md
Created June 8, 2024 18:11 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@bradhanson
bradhanson / README
Created June 19, 2022 21:02 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Let's get started
#
# Let's install nix (at the time of writing this is version 2.5.1
curl -L https://nixos.org/nix/install | sh
# I might not have needed to, but I rebooted