diff --git a/.aspell.en.pws b/.aspell.en.pws new file mode 100644 index 0000000..82613e6 --- /dev/null +++ b/.aspell.en.pws @@ -0,0 +1,7 @@ +personal_ws-1.1 en 0 +lastmod +showTableOfContents +Zig +Nim +tils +Spotify diff --git a/.githooks/pre-commit b/.githooks/pre-commit index c35105e..a8242cc 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -16,7 +16,6 @@ echo "Checking markdown files..." # Check markdown formatting with markdownlint-cli if command -v markdownlint &> /dev/null; then - echo "Running markdownlint..." markdownlint $STAGED_MD_FILES || { echo "❌ Markdown linting failed. Fix issues or use 'git commit --no-verify' to skip." exit 1 @@ -36,16 +35,26 @@ if command -v aspell &> /dev/null; then echo "Running spell check..." MISSPELLED=0 for file in $STAGED_MD_FILES; do - # Extract text, strip markdown syntax, check spelling - ERRORS=$(cat "$file" | aspell list --mode=markdown --personal=./.aspell.personal 2>/dev/null | sort -u) + # Get list of misspelled words + ERRORS=$(cat "$file" | aspell list --mode=markdown --lang=en --personal=./.aspell.en.pws 2>/dev/null | sort -u) if [ ! -z "$ERRORS" ]; then echo "⚠️ Possible misspellings in $file:" - echo "$ERRORS" | sed 's/^/ /' + # For each misspelled word, show context + while IFS= read -r word; do + if [ ! -z "$word" ]; then + SUGGESTION=$(echo "$word" | aspell pipe --mode=markdown --lang=en --personal=./.aspell.en.pws 2>/dev/null | grep -E "^&" | cut -d: -f2 | cut -d, -f1 | sed 's/^ //') + echo " '$word' → suggestion: $SUGGESTION" + # Use grep to find lines containing the word (case-insensitive) with line numbers + grep -n -i -w --color=always "$word" "$file" | head -3 | while IFS= read -r line; do + echo " $line" + done + fi + done <<< "$ERRORS" MISSPELLED=1 + echo "" fi done if [ $MISSPELLED -eq 1 ]; then - echo "" echo "Review spelling errors above. Add correct terms to .aspell.personal" echo "Use 'git commit --no-verify' to skip if needed." exit 1 diff --git a/content/tils/people-are-actually-right.md b/content/tils/people-are-actually-right.md index 202bdda..fc3bceb 100644 --- a/content/tils/people-are-actually-right.md +++ b/content/tils/people-are-actually-right.md @@ -8,26 +8,30 @@ title: "TIL: People Are Actually Right" image: "" image_credit: "" image_alt: "" -tags: ["philosophy"] +tags: ["philosophy", "lifestyle"] --- # Context -As a teenager I spent alot of my energy trying to be different. I don't know what informed my rebellious streak, I just -know that once artists got over a couple thousands actve listeners on Spotify, I started to lose interest in them. +As a teenager I spent a lot of my energy trying to be different. I don't know what informed my rebellious streak, I just +know that once artists got over a couple thousands active listeners on Spotify, I started to lose interest in them. -I'm barely old enough to think straight, and it dawned on me in a conversation with my wife, "you know, things are -probably actually bigger in Texas". +I'm barely old enough to think straight, and it dawned on me in a conversation with my wife, and I told her, "you know, +things are probably actually bigger in Texas". ## Reflection -I'm glad I still have a pretty strong rebel streak in me that propels me to be curious, to try the more esoteric -things. I'm a better person for having learned other niche programming languages like +I'm glad I still have a pretty strong rebel streak in me that propels me to be curious, to try the more esoteric things +that others ignore. I'm a better developer for having learned other niche programming languages like +- Zig - Clojure - Ocaml -- Zig - Gleam - Nim -(surprisigly no rust, its like mainstream in its deviance or something...) +(I know, surprisingly no rust, I feel like when it came on the scene it caught on too quickly...) + +But, I feel like I don't often give the public consensus opinion its fair shake. + +So here's to being a normie sometimes, its actually great to be like everyone else. diff --git a/flake.nix b/flake.nix index b81bc2e..c8ff103 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ ]; shellHook = '' - # export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell" + export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell" # Auto-install git hooks if not already installed if [ ! -L .git/hooks/pre-commit ]; then