Skip to content

Instantly share code, notes, and snippets.

View freddydumont's full-sized avatar

Frédérick Morin freddydumont

View GitHub Profile
@crabdancing
crabdancing / quick-nix-repl-tutorial.md
Last active December 21, 2024 19:45
a quick nix repl tutorial

If you want to probe a nix flake and figure out what it exposes, I typically just load it into nix repl and then tab complete around until I find what I'm looking for. E.g.:

$ nix repl
Welcome to Nix 2.18.5. Type :? for help.

nix-repl> :lf github:wez/wezterm/main?dir=nix
Added 12 variables.
@zephraph
zephraph / clean_node_modules.sh
Last active December 14, 2024 08:04
A shell script to clean up all node_modules in projects that haven't been touched in a couple weeks.
#!/bin/bash
DAYS_SINCE_LAST_CHANGE=14 # If a project hasn't been touched in this long its node_modules will be deleted
SEARCH_PATH="./Git" # Update this to the path where your code is stored
TOTAL_BYTES_REMOVED=0
Mb=1000000
Kb=1000
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune)