From 260f5ef344343d91a85dfa93432162eb141ba3ac Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:20:35 -0700 Subject: [PATCH 01/19] Manage the dependencies with uv, and run the tasks with make pyproject.toml declares Zensical and the linters, and uv.lock pins them, taking only releases at least a week old. The Makefile runs each task through uv: serve, build, format, lint, links and clean. EditorConfig gives editors the indentation that Python Markdown nests content by, and .gitattributes LF line endings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .editorconfig | 16 +++ .gitattributes | 1 + .gitignore | 8 +- .python-version | 1 + Makefile | 48 +++++++ docs/requirements.txt | 2 - pyproject.toml | 63 +++++++++ uv.lock | 296 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 432 insertions(+), 3 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .python-version create mode 100644 Makefile delete mode 100644 docs/requirements.txt create mode 100644 pyproject.toml create mode 100644 uv.lock diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6866ab8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +# Python Markdown nests lists, and content in admonitions and tabs, by four spaces. +indent_size = 4 + +[{*.js,*.json,*.yaml,*.yml}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.gitignore b/.gitignore index 3847721..f7e202e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ # Python virtual environment .venv/ -# Social plugin files +# The built site +site/ + +# Build caches, such as the social cards .cache/ + +# lychee's cache of the links it checked +.lycheecache diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..93a848f --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.15 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..44b2636 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +# Tasks for writing and checking the site; `make help` lists them. +# Each task runs through uv, which first creates or updates .venv from uv.lock. + +# The tasks need GNU make 4 or newer: the shell settings below use its .SHELLFLAGS. An older one, +# such as macOS's own 3.81, would run them without failing on an error inside a pipeline. +ifneq ($(filter 0 1 2 3,$(firstword $(subst ., ,$(MAKE_VERSION)))),) +$(error The tasks need GNU make 4 or newer, not $(MAKE_VERSION); see README.md) +endif + +# Recipes run with bash, which fails a recipe on its first failing command, including inside a +# pipeline. Flag undefined variables; no implicit rules, which a task runner never needs. +SHELL := bash +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS += --warn-undefined-variables --no-builtin-rules +.SUFFIXES: + +UV_RUN := uv run + +.DEFAULT_GOAL := help +.PHONY: help serve build format lint links clean + +# Python, which uv runs on every system, lists the tasks without updating .venv first. +help: ## List the tasks + @$(UV_RUN) --quiet --no-project python -c "import re, sys; [print(f' {name:<7} {text}') for path in sys.argv[1:] for name, text in re.findall(r'^([a-z-]+):.*## (.*)', open(path, encoding='utf-8').read(), re.M)]" $(MAKEFILE_LIST) + +serve: ## Preview the site, with drafts, rebuilding it as pages change + $(UV_RUN) zensical serve --open + +build: ## Build the site into site/, as CI does; a broken link fails it + $(UV_RUN) zensical build --clean + +format: ## Fix what rumdl can in Markdown + $(UV_RUN) rumdl fmt . + +# actionlint also runs shellcheck on the workflows' scripts. zizmor audits the workflows' security, +# including the online audits when GH_TOKEN is set. +lint: ## Markdown, spelling and the GitHub workflows + $(UV_RUN) rumdl check . + $(UV_RUN) typos + $(UV_RUN) actionlint + $(UV_RUN) zizmor --quiet $(if $(filter undefined,$(origin GH_TOKEN)),--offline) .github + +# The links workflow runs lychee weekly, as other sites can change at any time. +links: ## Check the links to other sites; needs lychee + lychee docs includes README.md + +clean: ## Remove the built site and the build caches + rm -rf site .cache diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 055160c..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -mkdocs-git-revision-date-localized-plugin==1.* -mkdocs-material[imaging]~=9.0 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e07140b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,63 @@ +[project] +name = "notes" +version = "0.1.0" +description = "My notes on various programming-related topics" +requires-python = ">=3.15,<3.16" +dependencies = [ + "zensical>=0.1.3", +] + +[tool.uv] +package = false +# Lock only releases at least a week old, as Dependabot's cooldown waits for: most compromised +# releases are found and pulled within days. +exclude-newer = "7 days" + +[tool.rumdl] +# Recognize Python Markdown and its extensions, such as admonitions, content tabs and snippets. +flavor = "mkdocs" +# Code blocks without a language, such as shell commands. +disable = ["MD040"] +# The license's legal text, and the issue template's bold prompts and blank lines to fill in. +exclude = ["LICENSE.md", ".github/ISSUE_TEMPLATE"] + +[tool.rumdl.MD004] +style = "dash" + +[tool.rumdl.MD007] +# Python Markdown nests lists, and content in admonitions and tabs, by four spaces. +indent = 4 +style = "fixed" + +[tool.rumdl.MD013] +line-length = 180 +# Table rows cannot wrap. +tables = false + +[tool.rumdl.MD033] +allowed-elements = ["figure", "figcaption"] + +[tool.rumdl.MD035] +style = "---" + +[tool.rumdl.MD076] +# A list item's admonition or table needs a blank line before it, which leaves the list's other +# items tight. +allow-loose-continuation = true + +[tool.typos.files] +# The lockfile's hashes. +extend-exclude = ["uv.lock"] + +[tool.typos.default.extend-words] +# NeetCode, a coding interview resource. +Neet = "Neet" + +[dependency-groups] +dev = [ + "actionlint-py>=1.7.12.25", + "rumdl>=0.3.5", + "shellcheck-py>=0.11.0.1", + "typos>=1.52.2", + "zizmor>=1.33.1", +] diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..21e6722 --- /dev/null +++ b/uv.lock @@ -0,0 +1,296 @@ +version = 1 +revision = 5 +requires-python = "==3.15.*" + +[options] +exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer-span = "P7D" + +[[package]] +name = "actionlint-py" +version = "1.7.12.25" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/75/36ee89db39bb3620d1e46fe1f6ec77d6000d30ff45345699e51b4c850e83/actionlint_py-1.7.12.25.tar.gz", hash = "sha256:83f83be4cd317c79b15cbb7022787513a6994f00bfb2dd8da02fa4e62b4f640d", size = 12438, upload-time = "2026-09-22T16:24:42.477Z" } + +[[package]] +name = "click" +version = "8.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/37/edbf1b0707709013c0cf2e8317e03d97ed29bf4cac709fe328904ae92a38/click-8.5.1.tar.gz", hash = "sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4", size = 399151, upload-time = "2026-11-06T17:37:01.021Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/7d/164b7ffc8624fe9efb4221bf9af485d5c1e41b9ae118045d2b6dc5457d8b/click-8.5.1-py3-none-any.whl", hash = "sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37", size = 126163, upload-time = "2026-11-06T17:36:59.287Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markdown" +version = "3.11.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ca/eb/dc0fd6eff604bfb870b7fb68b90985a32caaf3c76f67736bbf7f438acd59/markdown-3.11.3.tar.gz", hash = "sha256:81eb91631dc97ad1efbc76019ef0f80fe90ca49ddf81546752d79989c3bfff3e", size = 498810, upload-time = "2026-11-05T20:30:52.926Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/6f/1fa8970e960e5c832874399e6efa564870ade8206d57fef5d5e296b834f5/markdown-3.11.3-py3-none-any.whl", hash = "sha256:e1a31a112232504d753e5c01bb8c2de90d3f0ba986b063e10770cf7695b09e73", size = 116758, upload-time = "2026-11-05T20:30:51.775Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/30/54d11c8ca027114898cab97421fb39e4ffd9ddf47cdbc44df2ec76722da9/markupsafe-3.0.4-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65", size = 12791, upload-time = "2026-10-02T23:06:10.485Z" }, + { url = "https://files.pythonhosted.org/packages/10/6d/97c913e253a14bd3cd0e15a5c56d13203b823fa7ee32498342896a072dc4/markupsafe-3.0.4-cp315-cp315-android_24_x86_64.whl", hash = "sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163", size = 12527, upload-time = "2026-10-02T23:06:11.834Z" }, + { url = "https://files.pythonhosted.org/packages/26/f9/b86d032042a4d597d9e1997f0e5f63a3eedaf11258e0a05760b0a0a826ea/markupsafe-3.0.4-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92", size = 11602, upload-time = "2026-10-02T23:06:13.122Z" }, + { url = "https://files.pythonhosted.org/packages/f2/dc/73c14c1eedf0ac5fa3292ba43435e6c49d2c2050f33cebde541f8f4807f1/markupsafe-3.0.4-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a", size = 11817, upload-time = "2026-10-02T23:06:14.227Z" }, + { url = "https://files.pythonhosted.org/packages/8f/69/2c2fcaa5fcee22d72c7819c0d536fd181c74a688e6143845419579cd2863/markupsafe-3.0.4-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429", size = 11446, upload-time = "2026-10-02T23:06:15.574Z" }, + { url = "https://files.pythonhosted.org/packages/88/54/9e5ec76c62e6e2834d5a93623018c943e8b3bb41d663e3fd4c03303b9b85/markupsafe-3.0.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8", size = 11719, upload-time = "2026-10-02T23:06:16.701Z" }, + { url = "https://files.pythonhosted.org/packages/96/24/3ec292b44064c16229e064d770b2625bd8ea941aa61f44905a9fa44942c0/markupsafe-3.0.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97", size = 12075, upload-time = "2026-10-02T23:06:17.855Z" }, + { url = "https://files.pythonhosted.org/packages/aa/85/b64fdb1f304848518742136983c24e96d967bfb59a0ea160e92736901ab0/markupsafe-3.0.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b", size = 24656, upload-time = "2026-10-02T23:06:18.963Z" }, + { url = "https://files.pythonhosted.org/packages/9c/18/23997d4c65b355da6390d61cd56e0ab3befd6ba8dda25cb40c602bd0fa6b/markupsafe-3.0.4-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9", size = 27737, upload-time = "2026-10-02T23:06:20.117Z" }, + { url = "https://files.pythonhosted.org/packages/d4/36/35998dead3c6af88c38265a56e58100211f036234ab88eb2283fd4cbce44/markupsafe-3.0.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653", size = 25003, upload-time = "2026-10-02T23:06:21.284Z" }, + { url = "https://files.pythonhosted.org/packages/82/96/ef49135ce260db4ca4a12b119ed468449cd248db6b1468e2112b546d7a2e/markupsafe-3.0.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369", size = 23111, upload-time = "2026-10-02T23:06:22.524Z" }, + { url = "https://files.pythonhosted.org/packages/50/7d/83126e338bd88c17a220668235368ad719fd4638e426739858cbb8508f77/markupsafe-3.0.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19", size = 22403, upload-time = "2026-10-02T23:06:23.785Z" }, + { url = "https://files.pythonhosted.org/packages/83/dd/daf7e420de23c8206c365204e7b85e1251d8e19d34196a56336f316e5ed2/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e", size = 24083, upload-time = "2026-10-02T23:06:25.037Z" }, + { url = "https://files.pythonhosted.org/packages/19/3c/11eecdc06bc44ad5570350085b572ebf049e8f9a38d1ece6d76640b739cd/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811", size = 22931, upload-time = "2026-10-02T23:06:26.328Z" }, + { url = "https://files.pythonhosted.org/packages/0d/9e/ac0fd77f2a726e56ecc3ca0235d095feace1358d1b822406c2a2ef26a4dc/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea", size = 24299, upload-time = "2026-10-02T23:06:27.742Z" }, + { url = "https://files.pythonhosted.org/packages/d7/09/c6bd842ad58ff5b3bc76eeed7e9a42a6f11adc5d090ec697b72c9672731e/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916", size = 21948, upload-time = "2026-10-02T23:06:29.274Z" }, + { url = "https://files.pythonhosted.org/packages/a3/46/82f586711fed61e86faa1ee1bc317d68cd45a10c8bdbe3f7d1fdf9026ad8/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741", size = 23150, upload-time = "2026-10-02T23:06:30.583Z" }, + { url = "https://files.pythonhosted.org/packages/19/2d/2dfdce99318abbfa26925195fbc17db188c46a1ec6457be121b6f9cfeb42/markupsafe-3.0.4-cp315-cp315-win32.whl", hash = "sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b", size = 14269, upload-time = "2026-10-02T23:06:31.949Z" }, + { url = "https://files.pythonhosted.org/packages/5b/ec/6000fd82e8791e58fcd0456ec20f098957e2b03d5ed02eb73241a577c0ba/markupsafe-3.0.4-cp315-cp315-win_amd64.whl", hash = "sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214", size = 14496, upload-time = "2026-10-02T23:06:33.258Z" }, + { url = "https://files.pythonhosted.org/packages/bc/66/e73bd5016421d5d6e2fb6de7dd609f9de020942ac8c626526bd8c6eeaf82/markupsafe-3.0.4-cp315-cp315-win_arm64.whl", hash = "sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67", size = 14361, upload-time = "2026-10-02T23:06:34.539Z" }, + { url = "https://files.pythonhosted.org/packages/90/df/cb8c3dc98d313a951df2f8968f44e4cb5643df6d3cab749a530ce2f7d972/markupsafe-3.0.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad", size = 11760, upload-time = "2026-10-02T23:06:35.807Z" }, + { url = "https://files.pythonhosted.org/packages/d6/bb/4af9b3ca0753d654ac75f9531d5bd741bb77ca6e696f36807c475ffc099a/markupsafe-3.0.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99", size = 12108, upload-time = "2026-10-02T23:06:37.089Z" }, + { url = "https://files.pythonhosted.org/packages/3f/d4/b56429313aee5fd59b079c3df5615299959e25e7113eb6d8caadbdd7d38a/markupsafe-3.0.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002", size = 25762, upload-time = "2026-10-02T23:06:38.419Z" }, + { url = "https://files.pythonhosted.org/packages/65/f5/34c181e891aa4f7d59c918584672e0c5eb7fffe76c1387d1246008bf4081/markupsafe-3.0.4-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e", size = 28400, upload-time = "2026-10-02T23:06:39.819Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b5/ad14694fd0ac9a5ce30bc6498f2999378f418583dd1679cca5a1b512957e/markupsafe-3.0.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c", size = 25946, upload-time = "2026-10-02T23:06:41.381Z" }, + { url = "https://files.pythonhosted.org/packages/d6/a8/26b606445387d0ceb1eb1f21840094b84e4e3c3c3983d80d10b89823b490/markupsafe-3.0.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8", size = 23634, upload-time = "2026-10-02T23:06:42.748Z" }, + { url = "https://files.pythonhosted.org/packages/39/a2/b8814de672f1f0094d498bf646f2fec9d6356b503d28ef500b71c5095377/markupsafe-3.0.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe", size = 23488, upload-time = "2026-10-02T23:06:44.176Z" }, + { url = "https://files.pythonhosted.org/packages/db/c7/287223376fb73335a3cc5d6eb22c6ab01358cf33945a9c39c06b9dac3f4b/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2", size = 25037, upload-time = "2026-10-02T23:06:45.646Z" }, + { url = "https://files.pythonhosted.org/packages/f9/29/4df8355e313426d19e62ba33e0253c009ca12a0894ee77d67fa67255361c/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38", size = 23543, upload-time = "2026-10-02T23:06:47.264Z" }, + { url = "https://files.pythonhosted.org/packages/71/e5/8377731e8495668dcc768f645e717df18318c841edaf023a99395f6da9b4/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494", size = 25282, upload-time = "2026-10-02T23:06:48.795Z" }, + { url = "https://files.pythonhosted.org/packages/ed/5f/373456e37ceb1478d657d6fe769cbe0a39f0a8dfc1548eeb19c471eefdd9/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d", size = 22993, upload-time = "2026-10-02T23:06:50.31Z" }, + { url = "https://files.pythonhosted.org/packages/d7/93/2cbd5628435afb6f541bbaced4bce0c2edac4b09a142e6e928b8b0da9858/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894", size = 23712, upload-time = "2026-10-02T23:06:51.759Z" }, + { url = "https://files.pythonhosted.org/packages/81/99/157e10966b033b363aeda5263e82596ee232a0b1d082fdbf90aa417ff083/markupsafe-3.0.4-cp315-cp315t-win32.whl", hash = "sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78", size = 14300, upload-time = "2026-10-02T23:06:53.241Z" }, + { url = "https://files.pythonhosted.org/packages/33/05/55884815414c9706a23deca150b72c25a62109e65b0b6ce232077802c719/markupsafe-3.0.4-cp315-cp315t-win_amd64.whl", hash = "sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c", size = 14522, upload-time = "2026-10-02T23:06:54.729Z" }, + { url = "https://files.pythonhosted.org/packages/92/f9/ecbde7149e95b8a0f18e16d5d747f7dc06049d5da2e4f77f6f5e4a1f46a8/markupsafe-3.0.4-cp315-cp315t-win_arm64.whl", hash = "sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba", size = 14417, upload-time = "2026-10-02T23:06:56.246Z" }, +] + +[[package]] +name = "notes" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "zensical" }, +] + +[package.dev-dependencies] +dev = [ + { name = "actionlint-py" }, + { name = "rumdl" }, + { name = "shellcheck-py" }, + { name = "typos" }, + { name = "zizmor" }, +] + +[package.metadata] +requires-dist = [{ name = "zensical", specifier = ">=0.1.3" }] + +[package.metadata.requires-dev] +dev = [ + { name = "actionlint-py", specifier = ">=1.7.12.25" }, + { name = "rumdl", specifier = ">=0.3.5" }, + { name = "shellcheck-py", specifier = ">=0.11.0.1" }, + { name = "typos", specifier = ">=1.52.2" }, + { name = "zizmor", specifier = ">=1.33.1" }, +] + +[[package]] +name = "pathspec" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, +] + +[[package]] +name = "pygments" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pymdown-extensions" +version = "13.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/68/6da10ec6620ea74b621437f2d20df2e96f1c44dc3976c7136de4ebd0cc68/pymdown_extensions-13.1.2.tar.gz", hash = "sha256:724701395585d027fb18a6ad3377636570bac4f2917ed809f06cbc811d7e60bb", size = 902399, upload-time = "2026-11-20T18:44:39.775Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/4d/bef5fe206736149372215c13663d95eb13a377dca8bf95d4043afe088322/pymdown_extensions-13.1.2-py3-none-any.whl", hash = "sha256:20eec6babdadcdb47b5a91b3e69ff9f846d506e887125dcb027518c47d412693", size = 286286, upload-time = "2026-11-20T18:44:38.081Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/b8/c0b780928e2fb1c87e9e375818c6f121da2398b071012d1747be300b83f4/pyyaml-6.0.4.tar.gz", hash = "sha256:e24bf71af8a432d7808fabff134d38dfe16d3cbb41f2873bb4b1e42422de0a1a", size = 136336, upload-time = "2026-11-20T23:37:05.977Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/29/fb680bd299c2c6e004c1cc1914f8bad276c6014fe8debd5d6d61ea4c4ff4/pyyaml-6.0.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:12a155bc41509d71a2eb73e2191d9e400c1345ea99ac3d9946c31f40a4c840f8", size = 189560, upload-time = "2026-11-20T23:36:46.145Z" }, + { url = "https://files.pythonhosted.org/packages/af/6c/2ffdab56d7afeb039d957479a305516ddbaa08d0162d1e9165fb928e3aeb/pyyaml-6.0.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:070c22b6f490d6cc30912be9fb9ab1af9c752769b39b53616f6510c3f038ee6a", size = 181949, upload-time = "2026-11-20T23:36:47.065Z" }, + { url = "https://files.pythonhosted.org/packages/b3/07/3a20ed31a60084206ac20449583b0d1a42116b3c530d6857918e4ddbe4b6/pyyaml-6.0.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:872d2a592289061c1b987e335b3568a2616b474be02bd0608d8f551a385441cd", size = 803806, upload-time = "2026-11-20T23:36:48.145Z" }, + { url = "https://files.pythonhosted.org/packages/26/5b/3dd56027457b96e7e5ea2f4f5976e530d699884b4fd4e360e99e57fa6cca/pyyaml-6.0.4-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:914b19e17814315fbcca52031bf79b68237f3d87a948c584a667b18b468e4df7", size = 876808, upload-time = "2026-11-20T23:36:49.294Z" }, + { url = "https://files.pythonhosted.org/packages/b0/51/096a5495b33ff2da32f0c84f5bf8e042cf76f72641cba06ee9618ad01f4d/pyyaml-6.0.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c57e40928738c4a202852759f9e1ee2c7063429a9469ee1ac15651bbf7d69963", size = 833052, upload-time = "2026-11-20T23:36:50.505Z" }, + { url = "https://files.pythonhosted.org/packages/da/75/b4e86b5a27fcb9a9cf88e3b81d1b0c12cae2734311e508af18b93ff56286/pyyaml-6.0.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:8e0cd755ce5e9009fd95f9c553e5942478feb8f7dffa19435641fcdc3c20e8ca", size = 788983, upload-time = "2026-11-20T23:36:51.821Z" }, + { url = "https://files.pythonhosted.org/packages/2c/00/2a2cdad68237bcd416bd01688ecfb0e3fa1e68a841b74193db97ffd1c716/pyyaml-6.0.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2c11be5ab4d9f603a598b5ce93a2064ae38087bdf1b384c5397170054cda4e36", size = 828806, upload-time = "2026-11-20T23:36:52.959Z" }, + { url = "https://files.pythonhosted.org/packages/a8/15/39efefc88dd6fbc3be23cef08a819f5e8bf9a6c0bcf003fc09d38dd0010e/pyyaml-6.0.4-cp315-cp315-win_amd64.whl", hash = "sha256:67da066ca12eb60114ea87f2ecbcca622fff0c205c743cc900437127564fabf6", size = 157467, upload-time = "2026-11-20T23:37:04.171Z" }, + { url = "https://files.pythonhosted.org/packages/40/1d/fddc53420d9c12e7d27c36a59fabf186ba1f6117314da4927dc40b2da19b/pyyaml-6.0.4-cp315-cp315-win_arm64.whl", hash = "sha256:573debb9fe3075423d4f823795a678580e597218c25baef178d532b124a25a25", size = 151203, upload-time = "2026-11-20T23:37:05.079Z" }, + { url = "https://files.pythonhosted.org/packages/fa/ea/48e62a25084fc4b317f8bcc5c9823ddaaa73a0c7769ca451dda6919ff491/pyyaml-6.0.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c680622f85979f2ff59b4ae44c1ecb5566b2f0f0ffe5d0dc8b4bb6a0e916dabb", size = 193500, upload-time = "2026-11-20T23:36:54.416Z" }, + { url = "https://files.pythonhosted.org/packages/49/dd/8c4df6becc936125261607073fbcd55e1d902a8d53ae4e4893d53b9df0ef/pyyaml-6.0.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:18ea9bda247857fc0de05181675dc116b54c1b04ca3db71de5d2108c882823b7", size = 188474, upload-time = "2026-11-20T23:36:55.651Z" }, + { url = "https://files.pythonhosted.org/packages/d0/63/b60236ef09cbab7c5ce174aff59d49a3425b9a8e9bbe4690bd3b9b7d4fba/pyyaml-6.0.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6ac167ebebc0c387290406a337b9b5c8c343fa5f7928d5941e45a94b8ba3aa39", size = 848311, upload-time = "2026-11-20T23:36:56.961Z" }, + { url = "https://files.pythonhosted.org/packages/f6/3b/4b14f064ae5d6f69638a86bb7bf1a46d02bb4de083798e693a4a83b1418a/pyyaml-6.0.4-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4a2a8f27d24d4cdc05aa11df5f4c08e13f30d9e6674809b6a5ddcfcba49a653a", size = 891181, upload-time = "2026-11-20T23:36:58.077Z" }, + { url = "https://files.pythonhosted.org/packages/01/36/4e0b01e380bf3695d34a4bf6b9272c529f4c8d3195c733687d64fb9f8f06/pyyaml-6.0.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e956541cc7a3fff2bb5b17aeb6c5bb42c86c8e6dafb5ebdd41a05e72e702076b", size = 855715, upload-time = "2026-11-20T23:36:59.165Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a8/2784a29e687fa7a5882d47c925a98d1dbdd60ead521be14a9342c6a74ff9/pyyaml-6.0.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:8708f6ab9c2581ffa05f66dae3206bb0385949650537d7295fc7ab0d6454dd70", size = 818754, upload-time = "2026-11-20T23:37:00.248Z" }, + { url = "https://files.pythonhosted.org/packages/bb/85/62d54e223b4bc89ff85f087a5ce2648e5d929d3214d64613dbae17d5e045/pyyaml-6.0.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:a65339c24f2fb8d4419e06ceec1bda98bdcff727b3b533a81d5af6bb2dd34520", size = 845763, upload-time = "2026-11-20T23:37:01.331Z" }, + { url = "https://files.pythonhosted.org/packages/eb/40/6bd9090368664be984a83fd7fe64f8e044b067a52449679c309706e3199d/pyyaml-6.0.4-cp315-cp315t-win_amd64.whl", hash = "sha256:a3cc63af3d639d1609143711837b926183418260aae89ed95193c07b25b99d33", size = 163170, upload-time = "2026-11-20T23:37:02.3Z" }, + { url = "https://files.pythonhosted.org/packages/0d/22/468d36762a0c650cf2295052998eb1d419053335ea9ff48a043f5ae4d578/pyyaml-6.0.4-cp315-cp315t-win_arm64.whl", hash = "sha256:d276f23e2371deb5ee68dd252cc9c2402b806b54d8d2cc7efbb6c34c3a78d886", size = 156942, upload-time = "2026-11-20T23:37:03.209Z" }, +] + +[[package]] +name = "rumdl" +version = "0.3.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/f4/34eb7ea86ef402735926dfb6c8646c78911ac14f97deb005015a08c8db19/rumdl-0.3.5.tar.gz", hash = "sha256:495714f5a73ad6709f7620a8d21fda55dff28f6ddc3f1c280a128daaa6d0498c", size = 6167625, upload-time = "2026-11-18T16:20:33.571Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/75/e7/6002d257ff0b09e45a290a8c666c2a9f9ee61369aec0c8fcf8d3cf107b40/rumdl-0.3.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:be3fb0c3691c2891e7fadae97be807debbbb0672c23254e460dd6603c866a5b4", size = 8980336, upload-time = "2026-11-18T16:20:23.33Z" }, + { url = "https://files.pythonhosted.org/packages/f2/29/2cb1c3a379657ab1e4536762807e4295552d786e8e6e459a00e4b440039d/rumdl-0.3.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:df971a097887042a0a14cbecc9b7403828f73df2669be4c5a4b0e1900c929351", size = 8371327, upload-time = "2026-11-18T16:20:15.449Z" }, + { url = "https://files.pythonhosted.org/packages/00/de/b93915961e40185543adc4352733604259dae9d28d8c9598ccbaafcef73c/rumdl-0.3.5-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:0a7b1cbc2c37cf789b1171db06c23783b8fcbf2e0871ea8daf62b872cc70d6ce", size = 8628937, upload-time = "2026-11-18T16:20:18.371Z" }, + { url = "https://files.pythonhosted.org/packages/88/89/83a90bbf1a598c78fb7a8050eaf0db8c0a06a0844a58086606d6490c558c/rumdl-0.3.5-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:d4fc115ea6e0e849946537e1c418bcaa11729e4fcf8264b053b6191f46d8b8b0", size = 9280550, upload-time = "2026-11-18T16:20:28.17Z" }, + { url = "https://files.pythonhosted.org/packages/79/13/16c22612a17e021302afcc3ecd3ccfd494702faf776ed0435ad0bd7f21e7/rumdl-0.3.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2732789affcf85db4e5208e1e3fad3bab4ad01c2ae45f263d6ecb9bb8470d9f5", size = 8607580, upload-time = "2026-11-18T16:20:20.69Z" }, + { url = "https://files.pythonhosted.org/packages/8c/e8/6f5b5ff46770f34d0a86ed4f31bc172496dfabe9a3a63ad468a5aadf538e/rumdl-0.3.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:86cecbfba0fdb6d115406e07ece9deb76f2f57b10f49b2efb4abfd2c542a62fe", size = 9253654, upload-time = "2026-11-18T16:20:31.317Z" }, + { url = "https://files.pythonhosted.org/packages/0a/ba/ecc4890947ac297042077de4f8d3169f86d08f06c7359bdfa031234cb450/rumdl-0.3.5-py3-none-win_amd64.whl", hash = "sha256:8132ca1572c0ea2745639f113cc8c1b79f7c28c3ceef49de0f737e65554bb37d", size = 9610954, upload-time = "2026-11-18T16:20:25.778Z" }, +] + +[[package]] +name = "shellcheck-py" +version = "0.11.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/55/455b097417b3df3d330eff029c72c32f08b25739e3010acb30ad06d268ef/shellcheck_py-0.11.0.1.tar.gz", hash = "sha256:5c620c88901e8f1d3be5934b31ea99e3310065e1245253741eafd0a275c8c9cc", size = 3139, upload-time = "2025-08-09T17:53:42.492Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/27/d75b03e5458cefdb6d3b674566cd20476c3e4d3fe6cc9d68b7e3b854b296/shellcheck_py-0.11.0.1-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:b6a3fee28efda2e16e38d6e6d59faf7224300256456639727370d404730849e8", size = 6774472, upload-time = "2025-08-09T17:53:34.573Z" }, + { url = "https://files.pythonhosted.org/packages/61/ac/2a84c37171c0cf5a10ea4b0a27d43eb0a1d29bd98b49c2c5ffe17ad24bbe/shellcheck_py-0.11.0.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:6b88d0a244c82ed07e06a53e444da841f69330ca59ae15d4a66c391655dae7a0", size = 11381835, upload-time = "2025-08-09T17:53:36.852Z" }, + { url = "https://files.pythonhosted.org/packages/96/55/250e0e3367613a5c22bd82e33b16b889287d81ab0f7dda67e6514a4cccf4/shellcheck_py-0.11.0.1-py2.py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1b274df81de5b000ff78db433e7328b87e52e3c38481c60f8e488c3095beef05", size = 3800600, upload-time = "2025-08-09T17:53:38.643Z" }, + { url = "https://files.pythonhosted.org/packages/15/5b/bb14c0a7474463b1aa3c09e866cb172dffc66ed2993b7ea8f1db581e86ee/shellcheck_py-0.11.0.1-py2.py3-none-win_amd64.whl", hash = "sha256:784156289ecb17e91c692cd783ab5152333309588cabb10032a047331c63e759", size = 8027541, upload-time = "2025-08-09T17:53:40.889Z" }, +] + +[[package]] +name = "tomli" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662, upload-time = "2026-10-07T12:23:37.892Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/98/316fdc00f8c0939e6fe50461dd343c162d3ad51d1286eb25b7db54361d50/tomli-2.5.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:a525685c2f97da40762b8695eb7aa0af4c8344ca1905c73e4e29cb04d34607dc", size = 162775, upload-time = "2026-10-07T12:23:13.941Z" }, + { url = "https://files.pythonhosted.org/packages/c5/22/7b10fa5bb01c9539f53f69b619361b19350acc73657772ea7ac70ba309a8/tomli-2.5.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9dbb18c1cfb2f6517942fc9314437f66aa06d94436ffb1f06102ef3572f35276", size = 161406, upload-time = "2026-10-07T12:23:15.215Z" }, + { url = "https://files.pythonhosted.org/packages/9c/e7/1a069d86dfd20f1f84f71c63faed9f83c1d890bc06c27d82dc7d888fb573/tomli-2.5.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:752e8b1aa6a4367ef8bf6a1a1e005540f7ed055ba36d7193796812ca5404eb52", size = 273855, upload-time = "2026-10-07T12:23:16.471Z" }, + { url = "https://files.pythonhosted.org/packages/ae/83/d1ef43d1687d092ab9c235455c76e6e709483b346b056f086095c7c263a5/tomli-2.5.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47300f9bf791808f77d82747691c4bb09cb14bdf3060cca99b42cdc4361d5a7", size = 284910, upload-time = "2026-10-07T12:23:18.166Z" }, + { url = "https://files.pythonhosted.org/packages/cc/05/f4d9cf7de61822ece0c3873f30d291e324911c71a378b8bfe5ced13fd9f5/tomli-2.5.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:19b0dd8749f4ea2f112c5fcfb3c5248390c899d7e2e173f1d91abee1fa0ff391", size = 277723, upload-time = "2026-10-07T12:23:19.355Z" }, + { url = "https://files.pythonhosted.org/packages/42/28/78262493141fa543151cf005760c3cb01d09fc28a11f993c05109902cb8c/tomli-2.5.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:57b1c3b01fab802e2899bc3d168dca320e14165e2fd9fd584760fb4ca5826859", size = 285115, upload-time = "2026-10-07T12:23:20.698Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b9/e1dab9a30bcb677b5cc5cee810609cfd64f24306a3055767dd3fda00b1e0/tomli-2.5.0-cp315-cp315-win32.whl", hash = "sha256:667e521b37a6c5ccaa044202c235b530f90177ffe2cd4a64ecc213c7dd535feb", size = 103475, upload-time = "2026-10-07T12:23:21.941Z" }, + { url = "https://files.pythonhosted.org/packages/4c/bd/31a3790c11d6ea95fcf5e6022ac0f8d0543c9b61120b730fc481bd43d3b4/tomli-2.5.0-cp315-cp315-win_amd64.whl", hash = "sha256:d747252933c8a65ef6bd8da0fbb7ce28a90eb6119d8cd00772cd528aa07b68d5", size = 114589, upload-time = "2026-10-07T12:23:23.098Z" }, + { url = "https://files.pythonhosted.org/packages/47/a2/4f6310fa699364f0e3af7ee3af88dddd9af066d33e716a0265bbe2b3ea84/tomli-2.5.0-cp315-cp315-win_arm64.whl", hash = "sha256:75dbcde8751b0a960aa3de173aa5e894d590755c6d7758b7e774c06f1dc3cbdd", size = 111493, upload-time = "2026-10-07T12:23:24.233Z" }, + { url = "https://files.pythonhosted.org/packages/68/14/00853f0b396d8971107ae1921bb5b322fdee1650d2f16bf06c20adb532e5/tomli-2.5.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:2419c2a189551987b59d80e63ec355671283336f41c6b9b89462df679c7d0c57", size = 171380, upload-time = "2026-10-07T12:23:25.512Z" }, + { url = "https://files.pythonhosted.org/packages/89/ad/fa6949321dadee46b27363974fb197b94c911c3b0f7a5fd26d7dc18fc2a0/tomli-2.5.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:0dc598040da8d42cf20f0be588ed7004f46db12a0ac6c32e03a59dccedaaadcd", size = 170553, upload-time = "2026-10-07T12:23:26.855Z" }, + { url = "https://files.pythonhosted.org/packages/53/aa/3056c919eb3e084df3752b2cf5f865dcc04af0b27dba2f66d7b28af4633a/tomli-2.5.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49096930c8d886c9bbdab62d2d0d17ce823ddeea522309a190b36245d5b49e01", size = 294428, upload-time = "2026-10-07T12:23:28.132Z" }, + { url = "https://files.pythonhosted.org/packages/96/b2/faeeb5d8769ea3832021d73e892c8391eae7b4b4f8b55a789127bd8b18a9/tomli-2.5.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8ade5023067f99fe72b88accd30d0ea05a158e9e32a11f124e731ea9695313f", size = 304909, upload-time = "2026-10-07T12:23:29.381Z" }, + { url = "https://files.pythonhosted.org/packages/f6/52/f094c09e73fb654b621716d019acb5d29bdfd1be01df80c281d552bda48d/tomli-2.5.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:b69564772b5c8f22ea5f498dff08cfa825045b4d4c4400529000bdf818aa3b2a", size = 293220, upload-time = "2026-10-07T12:23:30.608Z" }, + { url = "https://files.pythonhosted.org/packages/86/f5/0c30541078ca4b505ce3bd76ed931facbfec524dd018535d691d1af0a6d2/tomli-2.5.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:8ff3a2ca028c7eee0c777f9a092038d0a594a9fa04e215f929a22c329e2cb142", size = 305705, upload-time = "2026-10-07T12:23:32.181Z" }, + { url = "https://files.pythonhosted.org/packages/05/74/590e7d19d6a118fc5cc5704ff358e21d95b8573f6b9443b1519f29ca8825/tomli-2.5.0-cp315-cp315t-win32.whl", hash = "sha256:62fc1bc8eb03e3a9cadfca713d65614ed8e09d974a283295ffe3a831976b4dc5", size = 108432, upload-time = "2026-10-07T12:23:33.496Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b8/63a75cfb27a17c38550e44025d3a6e7be64516fd8608a3b75703bf37d81b/tomli-2.5.0-cp315-cp315t-win_amd64.whl", hash = "sha256:f3fcbc57b1791fa6cbe5d8434179d51de12be1a4811469529f47f6e7487a2571", size = 117281, upload-time = "2026-10-07T12:23:34.648Z" }, + { url = "https://files.pythonhosted.org/packages/72/01/e8c1debb2173973372934c68fc8e46170ab60ef23ed4592dff4dec6e8993/tomli-2.5.0-cp315-cp315t-win_arm64.whl", hash = "sha256:d2ba24db8a9376921b5e87b4762b9adb0f3f1deaea68f2b8b0bb2c11efb9c3e7", size = 115069, upload-time = "2026-10-07T12:23:35.77Z" }, + { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765, upload-time = "2026-10-07T12:23:36.875Z" }, +] + +[[package]] +name = "typos" +version = "1.52.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/9a/c9a771d607af6741e2d75a202ea1fbf4e7e34d4f962a8738aceb51cc00a7/typos-1.52.2.tar.gz", hash = "sha256:7eb832b2ec5d0459b721fcb1c832a428c6491b140c28765b62494e8ce0d560b0", size = 1857335, upload-time = "2026-11-11T02:17:31.425Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fa/d4/d83e7d259afc4107770977cb04826cfd07da78e501ee25db7e7f9069b8a4/typos-1.52.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:14d0c3cc8153a9336c61f14cd71076ba619d2a5aa0792f748133b4dbfb649782", size = 3466254, upload-time = "2026-11-11T02:17:20.194Z" }, + { url = "https://files.pythonhosted.org/packages/53/78/181e0b94c1671a1df5f2135764425f36e5fe07a7c7aaa7fb6e5d8b2a9da4/typos-1.52.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:aba39b3510062d0810c6dfbb7d9210712eb6b8928d8f454b9bf9fcca5b38e717", size = 3370894, upload-time = "2026-11-11T02:17:21.932Z" }, + { url = "https://files.pythonhosted.org/packages/ba/72/539fe4da64c4a27148e8f05cec4f1b773b021a0bf1379f8f8d3b1dde9559/typos-1.52.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcf914c16e7e18ac905b2a87fb68cee0cf5d0c198d4457d79290475a49aa009b", size = 8385933, upload-time = "2026-11-11T02:17:23.484Z" }, + { url = "https://files.pythonhosted.org/packages/36/e6/c04bb9193cbf4b85fb0f2b5e7a24be4f156a45c8c33f8e94a32f73c8f4a4/typos-1.52.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b49520a7b8daaec6956441c841bbf53bc1b221877db3891a363e32c5d4be48a1", size = 7899551, upload-time = "2026-11-11T02:17:25.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/6b/d7a6bdfab1d48d6a143269427853f3586b3426c9de2898979f723105b0fd/typos-1.52.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6f391c2544b3f7b557bc546f24ebf598c0171457c0bec8edd9161b2e6e5fd7dc", size = 7231205, upload-time = "2026-11-11T02:17:26.731Z" }, + { url = "https://files.pythonhosted.org/packages/25/2c/18b57f03fb40bd2d58d6ac13727bfa57029f15ffa07f0b188efc5f8b55d0/typos-1.52.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b6e2365d8c424a714e1256c64456b2d8b28bd3e13f77d885bc4a62d59e425410", size = 8278350, upload-time = "2026-11-11T02:17:28.377Z" }, + { url = "https://files.pythonhosted.org/packages/55/17/9a191774c43827b58e269bc935d5b19b23856efba5487eea5249b9afc9e6/typos-1.52.2-py3-none-win_amd64.whl", hash = "sha256:2fb213ad10835bc5478db4a7609dd75f78daded00f7c983cd6c486225ccbf3c6", size = 3371312, upload-time = "2026-11-11T02:17:29.935Z" }, +] + +[[package]] +name = "zensical" +version = "0.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "pathspec" }, + { name = "pygments" }, + { name = "pymdown-extensions" }, + { name = "pyyaml" }, + { name = "tomli" }, + { name = "zensical-ui" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/d6/aa6d76195af77534fa5cdaca1dac490a37f6c1a510c8958437607191adaa/zensical-0.1.3.tar.gz", hash = "sha256:70db96f93c0cebba22c47e7480b51c2132a28e10360f648f2df3f40f6287d386", size = 547926, upload-time = "2026-11-20T15:18:54.096Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/93/3c851407739e1d0de1e3db7943386be200f863c8209905ab1b7561c71829/zensical-0.1.3-cp311-abi3-macosx_10_12_x86_64.whl", hash = "sha256:63ff8c2e2bc939459d1c76bdea45deaca83b15a056913f4d9fe7391c730a58c1", size = 8904275, upload-time = "2026-11-20T15:18:37.755Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d9/3b8a53bddbdb5ed96c3915a6ffbbdad1e280fea0bea0cdb4c0e308c4c051/zensical-0.1.3-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:8bb4fa0fbfa36fc8ed8d81a0a47d9013f40073e265438e4ce1bcff1f0caa71fb", size = 8406848, upload-time = "2026-11-20T15:18:39.782Z" }, + { url = "https://files.pythonhosted.org/packages/f4/e1/4d250e4ad0868fdfc7fa87d2de01edddb0543a9311b8bd1897e5838f02bb/zensical-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6d8a797347cf94ebae348bdf09ee67dd8d131b9508222fa5731dd39fa270382d", size = 8859269, upload-time = "2026-11-20T15:18:42.036Z" }, + { url = "https://files.pythonhosted.org/packages/36/ab/9ac4334f3cbb45ab48c8081afa18f24d170292aca5e6255a874b6e2186d0/zensical-0.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a033f82e089abb76cc2c7531cf1702782472acceb14c96e7020edc8c3d8a736c", size = 9364511, upload-time = "2026-11-20T15:18:44.201Z" }, + { url = "https://files.pythonhosted.org/packages/1f/91/d6b87aeff626d601fb94a73e7ff52bb24aadd855a40b517dbced28b2437e/zensical-0.1.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2002b246cc242b6670f216d395bc18b30dafe5fe38a7d34b73df34362e9b2570", size = 9031331, upload-time = "2026-11-20T15:18:46.323Z" }, + { url = "https://files.pythonhosted.org/packages/90/33/9e72aade59dd6bfe08c4c35c5f0f848f196af0794cc53344f118856ceb43/zensical-0.1.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:5a27828e8831c4ef08e1d54e050bef81030b8ac20ea60bb972e6fac56e47b9c6", size = 9635601, upload-time = "2026-11-20T15:18:48.474Z" }, + { url = "https://files.pythonhosted.org/packages/e8/e3/6fa3ad09d055fa37533c2408f7aec462e2dbad1a48431b4579e69d70349f/zensical-0.1.3-cp311-abi3-win_amd64.whl", hash = "sha256:d93dc520a91340c44d5ff0b78d5e69858ec97dcbab6448e42d17b919da3e0ab3", size = 9576349, upload-time = "2026-11-20T15:18:50.522Z" }, + { url = "https://files.pythonhosted.org/packages/70/5f/396c941b1832044fc602d8978cd17d01aec7328ae48043b17bbdb419246f/zensical-0.1.3-cp311-abi3-win_arm64.whl", hash = "sha256:a878c768d03d983946ef31d1fe2bd43bb03b8c8ef373a32113136c3d2f733aa5", size = 8955286, upload-time = "2026-11-20T15:18:52.227Z" }, +] + +[[package]] +name = "zensical-ui" +version = "0.0.43" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/a4/b4371de747307b046f734c75aa820c904d94efa0cac959593ff681738c1d/zensical_ui-0.0.43.tar.gz", hash = "sha256:e82d161ad797fff833cd045cfa3ddb9be69f276386b78dd5a4dff76dfbd41596", size = 4078131, upload-time = "2026-11-19T19:07:26.578Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/a8/6f58ac0a22e0ad479d2dd483a9a82e50017c4f79e20141f3d3f62d995a77/zensical_ui-0.0.43-py3-none-any.whl", hash = "sha256:804bfe979ccc1b96244b7decde09e3a92a3c67da64e6887a617877a30ce02ff2", size = 10070402, upload-time = "2026-11-19T19:07:23.804Z" }, +] + +[[package]] +name = "zizmor" +version = "1.33.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3d/70/a269633902781427600109dbf311a30d789d22a2f63d7a1731bfe87d2b22/zizmor-1.33.1.tar.gz", hash = "sha256:d4ec8974b3cbd6e997ceac7cd788b0d49392d1683bb509cd4a897fcccf79c71a", size = 611913, upload-time = "2026-11-22T22:27:13.979Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/54/697841064465eefacbbb425a364dc008a4e4ac4d96ced7b704d4a2932d06/zizmor-1.33.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f4458e4d845075a2238aee01874d1fbab4e4ba3983d844415dcb4f7bcd61ee08", size = 10312498, upload-time = "2026-11-22T22:26:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/e1/fa/6e0fe9169c5675614767b120a0d34f42c30f7858beb3b2121d9fd798275d/zizmor-1.33.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaaeb5c4c4947fe4a29d69e90f45cd31bd68a7cb99f3171e4d32199761cb8aba", size = 9933389, upload-time = "2026-11-22T22:26:53.042Z" }, + { url = "https://files.pythonhosted.org/packages/9f/34/17f1f41e41c9ca5a2f8e9f9b33a9f439d2838a339cf774ded871e69197b1/zizmor-1.33.1-py3-none-manylinux_2_24_aarch64.whl", hash = "sha256:0927b0f2f86d67a98444ae7fe2529963e29ffc3acff73e588f479f33361c926c", size = 10172250, upload-time = "2026-11-22T22:26:55.105Z" }, + { url = "https://files.pythonhosted.org/packages/c1/4a/fd81a948f60a95dd9defb8fba032e6593010025ee49d15d4e19fa9414fa3/zizmor-1.33.1-py3-none-manylinux_2_28_armv7l.whl", hash = "sha256:807b7f8b86fe23ad6431f1663c37f707467f3996887c6cf91dfc378621a89fa0", size = 9769416, upload-time = "2026-11-22T22:26:56.994Z" }, + { url = "https://files.pythonhosted.org/packages/49/bf/89961bcb9034e7c25af39f6e9d65d37eff9314b49034c2e2bb70ae42d818/zizmor-1.33.1-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:49eb92a95347e7da58c3123e4d5b297dbb6fe8ecc328e9db68df14c08e25e151", size = 10623554, upload-time = "2026-11-22T22:26:59.065Z" }, + { url = "https://files.pythonhosted.org/packages/d6/20/2f658100b457113e61851df63f736531e62a2803cb7a1bb271a1239e6430/zizmor-1.33.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ed1dba4e9bbe590515a35359abbbe926c9cbd5f5fe52eb2f7e791250bdc536f", size = 10184773, upload-time = "2026-11-22T22:27:01.341Z" }, + { url = "https://files.pythonhosted.org/packages/df/62/3003fd15f3fa44f6b05014b74a3e16e84d9aa430b91580ecfe2652123abd/zizmor-1.33.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e31d5e0950fbbabd7b499a63950f10565c30c50ca8a1937a1121f547e2ce3c94", size = 9741213, upload-time = "2026-11-22T22:27:03.27Z" }, + { url = "https://files.pythonhosted.org/packages/da/a7/de6527426732bf3bb701fdbddb31e124dec00b861b98a9f5d39d0c735c9a/zizmor-1.33.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:05d49c0ba1ba20531b1abe24d839dac3a6d5600d81944547015195d7cfccf336", size = 10719283, upload-time = "2026-11-22T22:27:05.311Z" }, + { url = "https://files.pythonhosted.org/packages/3b/10/a0c765a7ceaa47a801863e98ce5ef611b0bd053fc42b1eb43659b4d930c1/zizmor-1.33.1-py3-none-win32.whl", hash = "sha256:17d3f0f563943493711cd94312ac5ba9ade0bd97d21a91c5d3a617a43cae5c78", size = 8862311, upload-time = "2026-11-22T22:27:08.335Z" }, + { url = "https://files.pythonhosted.org/packages/35/ee/24f1d8f12ea4df22658978dfbe3d6cdfb01b5420f17a56c1735130f6342f/zizmor-1.33.1-py3-none-win_amd64.whl", hash = "sha256:1ebbb1111f5d98e6d0a3643afed1d808f880c7b7cbe671b0d08f37a26f0b7b0b", size = 9996007, upload-time = "2026-11-22T22:27:10.168Z" }, + { url = "https://files.pythonhosted.org/packages/43/be/ea9d911d4116244b828c12e330237d9244b305b7560ac82be81350cddfa0/zizmor-1.33.1-py3-none-win_arm64.whl", hash = "sha256:9ad301363e4f7df39d6924ed5b3aabf09958817ef891c740c26680b5f9656851", size = 9508760, upload-time = "2026-11-22T22:27:12.27Z" }, +] From c37c4d38b02f4d9929dd3a0e8053b16e0643d158 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:20:50 -0700 Subject: [PATCH 02/19] Build the site with Zensical Zensical, from the team behind Material for MkDocs, reads the same Markdown and implements the plugins the site uses itself. zensical.toml, from the template that `zensical new` writes, replaces mkdocs.yml. - The modern theme, in teal, keeps the top-level tabs and adds the template's features: code copy buttons, breadcrumbs, footer navigation, rich tooltips, and edit, view source and "Copy as Markdown" buttons. - New plugins: llmstxt, and glightbox for images. The site drops Google Analytics. - KaTeX, from jsDelivr at an exact version, replaces MathJax and polyfill.io, whose domain was compromised in 2024. KaTeX lacks MathJax's \displaylines, so one formula uses a gathered environment instead. - Snippets appends the glossary to every page, instead of each page including it, and a missing snippet fails the build. - New extensions from the template: Mermaid diagrams, definition lists, highlighting, sub- and superscripts, smart symbols and automatic links. - Pages named *.draft.md appear only in the preview. - reference/mkdocs.md becomes reference/zensical.md, rewritten for the new setup. The old page embedded files that no longer existed. - The less command's last table row was a paragraph, as the comment above it for markdownlint ended the table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/assets/images/favicon.svg | 23 ++ docs/index.md | 2 - docs/internship_prep/hardware/hw_questions.md | 2 - docs/internship_prep/hardware/hw_reference.md | 8 +- docs/internship_prep/software/sw_questions.md | 2 - docs/internship_prep/software/sw_reference.md | 2 - docs/javascripts/katex.js | 12 + docs/javascripts/mathjax.js | 16 -- docs/reference/git/git_contributing.md | 2 +- docs/reference/mkdocs.md | 163 -------------- docs/reference/unix.md | 3 - docs/reference/wsl.md | 2 - docs/reference/zensical.md | 213 ++++++++++++++++++ docs/setup/cli/common-cli.md | 2 - docs/setup/cli/windows-cli.md | 2 - docs/setup/gui/windows-gui.md | 2 - docs/setup/ide.md | 2 - docs/setup/index.md | 2 - docs/setup/terminals/windows-terminal.md | 2 - mkdocs.yml | 126 ----------- zensical.toml | 196 ++++++++++++++++ 21 files changed, 449 insertions(+), 335 deletions(-) create mode 100644 docs/assets/images/favicon.svg create mode 100644 docs/javascripts/katex.js delete mode 100644 docs/javascripts/mathjax.js delete mode 100644 docs/reference/mkdocs.md create mode 100644 docs/reference/zensical.md delete mode 100644 mkdocs.yml create mode 100644 zensical.toml diff --git a/docs/assets/images/favicon.svg b/docs/assets/images/favicon.svg new file mode 100644 index 0000000..7d18816 --- /dev/null +++ b/docs/assets/images/favicon.svg @@ -0,0 +1,23 @@ + + + + + diff --git a/docs/index.md b/docs/index.md index 7580ddc..cff9c8b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -30,5 +30,3 @@ retention and serves as a resource that I can use to refresh my memory. - Internship Preparation: How I efficiently apply for internships and prepare for interviews - Reference: Quick reference on how to use popular programming-related software - About Me: Graphics related to my experiences - ---8<-- "includes/abbreviations.md" diff --git a/docs/internship_prep/hardware/hw_questions.md b/docs/internship_prep/hardware/hw_questions.md index fd39466..8a92d30 100644 --- a/docs/internship_prep/hardware/hw_questions.md +++ b/docs/internship_prep/hardware/hw_questions.md @@ -38,5 +38,3 @@ The answers to some of these questions can be found in the [Hardware Reference]( ## Resources - [VLSI Interview Questions](http://asic.co.in/Index_files/vlsi_interview_questions.htm) - ---8<-- "includes/abbreviations.md" diff --git a/docs/internship_prep/hardware/hw_reference.md b/docs/internship_prep/hardware/hw_reference.md index 5b78d0a..c21676b 100644 --- a/docs/internship_prep/hardware/hw_reference.md +++ b/docs/internship_prep/hardware/hw_reference.md @@ -276,8 +276,10 @@ Multiplication is a complex operation: avoid if possible Let $B,B_H,B_L$ be defined a similar matter. Therefore, $$ - \displaylines{A = A_{2N-1}A_{2N-2}...A_0 = A_H \times 2^N + A_L \\ - B = B_{2N-1}B_{2N-2}...B_0 = B_H \times 2^N + B_L} + \begin{gathered} + A = A_{2N-1}A_{2N-2}...A_0 = A_H \times 2^N + A_L \\ + B = B_{2N-1}B_{2N-2}...B_0 = B_H \times 2^N + B_L + \end{gathered} $$ - $2^N$ shifts left by N bits @@ -367,5 +369,3 @@ Example: write $-58.25_{10}$ in 32-bit floating point - Structural: describe how it is built from simpler modules (instantiates other modules) - Unlike regular Verilog, SystemVerilog supports OOP and generate statements - Generate statements are for readability; they don’t change hardware implementation - ---8<-- "includes/abbreviations.md" diff --git a/docs/internship_prep/software/sw_questions.md b/docs/internship_prep/software/sw_questions.md index 3d15f07..44c6bf2 100644 --- a/docs/internship_prep/software/sw_questions.md +++ b/docs/internship_prep/software/sw_questions.md @@ -40,5 +40,3 @@ Similar or even identical questions can be found on LeetCode. - Performance advantage of Numpy - C/C++ questions - See [Top Embedded C Interview Questions](https://www.interviewbit.com/embedded-c-interview-questions/) - ---8<-- "includes/abbreviations.md" diff --git a/docs/internship_prep/software/sw_reference.md b/docs/internship_prep/software/sw_reference.md index a660720..7d37fb2 100644 --- a/docs/internship_prep/software/sw_reference.md +++ b/docs/internship_prep/software/sw_reference.md @@ -196,5 +196,3 @@ Be able to explain concepts in your own words and give examples of you applying - Corner cases - Root-cause analysis - Parts of a good bug report - ---8<-- "includes/abbreviations.md" diff --git a/docs/javascripts/katex.js b/docs/javascripts/katex.js new file mode 100644 index 0000000..416e7b9 --- /dev/null +++ b/docs/javascripts/katex.js @@ -0,0 +1,12 @@ +// Typesets the formulas that Arithmatex wraps in \( \) and \[ \], on every page that instant +// navigation loads. +document$.subscribe(({ body }) => { + for (const element of body.querySelectorAll(".arithmatex")) { + renderMathInElement(element, { + delimiters: [ + { left: "\\(", right: "\\)", display: false }, + { left: "\\[", right: "\\]", display: true }, + ], + }) + } +}) diff --git a/docs/javascripts/mathjax.js b/docs/javascripts/mathjax.js deleted file mode 100644 index 080801e..0000000 --- a/docs/javascripts/mathjax.js +++ /dev/null @@ -1,16 +0,0 @@ -window.MathJax = { - tex: { - inlineMath: [["\\(", "\\)"]], - displayMath: [["\\[", "\\]"]], - processEscapes: true, - processEnvironments: true - }, - options: { - ignoreHtmlClass: ".*|", - processHtmlClass: "arithmatex" - } -}; - -document$.subscribe(() => { - MathJax.typesetPromise() -}) diff --git a/docs/reference/git/git_contributing.md b/docs/reference/git/git_contributing.md index 1613d67..85a33c4 100644 --- a/docs/reference/git/git_contributing.md +++ b/docs/reference/git/git_contributing.md @@ -73,7 +73,7 @@ git remote prune origin - Actions: automate, customize, and execute software development workflows - [Actions documentation](https://docs.github.com/en/actions) - [GitHub Marketplace - Actions](https://github.com/marketplace?type=actions) - - [Explanation of this project's workflows](../mkdocs.md#ci-cd-using-github-actions) + - [Explanation of this project's workflows](../zensical.md#ci-cd-using-github-actions) - [Encrypted secrets documentation](https://docs.github.com/en/actions/security-guides/encrypted-secrets) - Wiki: host very basic documentation, [GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) only diff --git a/docs/reference/mkdocs.md b/docs/reference/mkdocs.md deleted file mode 100644 index c00b5eb..0000000 --- a/docs/reference/mkdocs.md +++ /dev/null @@ -1,163 +0,0 @@ -# :material-web: Material for MkDocs - -This website was created using Material for MkDocs, a simple yet powerful framework for creating documentation. -All it requires is a Markdown file for every page, and a configuration file that connects everything together. -With Material for MkDocs providing [somewhat] customizable features, frontend, and deployment methods, -I can focus my time on the content of the site. - -## Useful Documentation Pages - -- [Search for icons](https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/#search) -- [Admonition types](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types) -- [Keyboard keys syntax](https://facelessuser.github.io/pymdown-extensions/extensions/keys/#extendingmodifying-key-map-index) -- [Setup](https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/) -- [Reference](https://squidfunk.github.io/mkdocs-material/reference/) - -## Setup - -### Page Tree Example - -Based on this site. Paths in the page tree are relative to `docs/`. - -``` yaml -nav: - - Home: index.md # Homepage, first tab - - Setup: # Second tab - - setup/index.md # Second tab homepage - - Settings: setup/settings.md # Second tab first page - - Reference: # Third tab - - Mkdocs: reference/docker.md.md # Third tab first page (no third tab homepage) -``` - -### Plugins - -!!! tip "" - If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. - MkDocs enables it by default if there is no plugins entry set. - -- Automatic documentation generation using [mkdocstrings](https://mkdocstrings.github.io/) -- Page revision time using [mkdocs-git-revision-date-localized-plugin](https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#revision-date-localized) - - Note: times are in UTC - -## Reference - -Demonstrations of the features I use. View [this page raw](https://raw.githubusercontent.com/patrick-5546/notes/main/docs/reference/mkdocs.md) for the Markdown syntax used. -View the documentation reference for what be in the configuration file to enable a feature. - -### Collapsible blocks, code block formatting, embedding external files - -??? quote "Click to toggle open/close" - - Syntax highlighting for inline code: Python's `#!python range()` function... - - ``` python title="Embed of docs/reference/mkdocs.md" linenums="1" - --8<-- "docs/requirements.txt" - ``` - -### Content tabs, icons, glossary - -Markdown: - -=== ":octicons-file-code-16: docs/example.md" - - 1. Use the term (i.e. "WSL") - 2. Import glossary by adding to end of the file: --8<-- "includes/abbreviations.md" - -=== ":octicons-file-code-16: includes/abbreviations.md" - - 1. Define the term - ```` markdown - *[WSL]: Windows Subsystem for Linux - ```` - -Result: - -WSL is a term in the glossary. - -### Table, keyboard keys - -| Shortcut | Description | -| ----------- | ------------------------------------ | -| ++alt++ + (++shift++) + ++tab++ | Navigate between windows | -| ++windows+ctrl++ + ++arrow-left++/++arrow-right++ | Navigate between virtual desktops | -| ++f11++ | Fullscreen | - -### Task list, inline math equations - -- [x] Result of task list -- [ ] Prove $e=mc^2$ - -Bug: [Line break workaround in math equations](https://github.com/mathjax/MathJax/issues/2312#issuecomment-538185951) - -## CI / CD Using GitHub Actions - -### Deploy - -The Materials for MkDocs documentation gives an example deploy workflow. I modified it slightly -to properly support page revision times using [mkdocs-git-revision-date-localized-plugin](#plugins). -I also used encrypted secrets to -[use Google Analytics](https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#google-analytics) without exposing the key. -This workflow is run on every push to the main branch - -#### Deploy workflow - -??? quote "Deploy workflow for this project" - - ``` yaml title=".github/workflows/deploy.yml" linenums="1" - --8<-- ".github/workflows/deploy.yml" - ``` - -### Lint - -#### Markdown linter - -I use markdownlint to check for programmatic and stylistic errors in the application's Markdown files. - -I configured the errors using a `.markdownlint.json` file in the project's root directory to support -the syntax of Material for MkDocs features. -This workflow is run on every push and pull request to the main branch. - -??? quote "markdownlint configuration for this project" - - ``` json title=".markdownlint.json" linenums="1" - --8<-- ".markdownlint.json" - ``` - -markdownlint resources: - -- [markdownlint rules reference](https://github.com/DavidAnson/markdownlint/blob/v0.24.0/doc/Rules.md) -- [markdownlint extension for VS Code](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - -#### Check Markdown links - -I check for broken links using markdown-link-check. This action checks links to pages on the internet -(`https://www.google.com`) and files in the repository (`./index.md`). -However, it does not check whether a section exists in the file (`./index.md#overview`). -This workflow is run on every push and pull request to the main branch, as well as on a schedule. - -#### Lint workflows - -??? quote "Lint workflow for this project" - - ``` yaml title=".github/workflows/lint.yml" linenums="1" - --8<-- ".github/workflows/lint.yml" - ``` - -??? quote "Scheduled Tasks workflow for this project" - - ``` yaml title=".github/workflows/scheduled_tasks.yml" linenums="1" - --8<-- ".github/workflows/scheduled_tasks.yml" - ``` - -### Resources - -- [Schedule workflow runs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) - -## Example Sites - -- [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) and [Pymdown Extensions](https://facelessuser.github.io/pymdown-extensions/) documentation -- [up42](https://sdk.up42.com/) - - Uses the mkdocstrings plugin for the Code Reference -- This site! - ---8<-- "includes/abbreviations.md" diff --git a/docs/reference/unix.md b/docs/reference/unix.md index c1b1016..2dc357b 100644 --- a/docs/reference/unix.md +++ b/docs/reference/unix.md @@ -57,7 +57,6 @@ Read contents of a file or command output quickly and without filling up termina | Command | Description | | ------- | ----------- | | `less ` | Read the contents of a file | - | ` | less` | Read the standard output (what would be printed to the terminal) of `` | ??? info "Commands inside less" @@ -123,5 +122,3 @@ Resources: - [Linuxize shebang guide](https://linuxize.com/post/bash-shebang/) - run script without having to specify the interpreter - [Linuxize add to the PATH environment variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/) - ---8<-- "includes/abbreviations.md" diff --git a/docs/reference/wsl.md b/docs/reference/wsl.md index 16493bb..2b5ec3f 100644 --- a/docs/reference/wsl.md +++ b/docs/reference/wsl.md @@ -54,5 +54,3 @@ - [Export and import WSL distributions](https://winaero.com/export-import-wsl-linux-distro-windows-10/) - [Change default user in WSL 2](https://github.com/microsoft/WSL/issues/4276#issuecomment-553367389) - [Get started using Git on WSL](https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git) - ---8<-- "includes/abbreviations.md" diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md new file mode 100644 index 0000000..f5ba367 --- /dev/null +++ b/docs/reference/zensical.md @@ -0,0 +1,213 @@ +# :simple-zensical: Zensical + +This website is built with Zensical, a static site generator from the team behind Material for MkDocs. +All it requires is a Markdown file for every page, and a configuration file that connects everything together. +With Zensical providing the theme, search, and deployment-ready output, I can focus my time on the content of the site. + +The site started out on Material for MkDocs. Zensical builds MkDocs projects with few changes, +and it is where the team now develops new features, so I moved the site to it. + +## Useful Documentation Pages + +- [Authoring guide](https://zensical.org/docs/authoring/markdown/): the Markdown syntax and extensions +- [Included icon sets](https://zensical.org/docs/authoring/icons-emojis/#included-icon-sets) +- [Admonition types](https://zensical.org/docs/authoring/admonitions/#supported-types) +- [Keyboard keys syntax](https://facelessuser.github.io/pymdown-extensions/extensions/keys/#extendingmodifying-key-map-index) +- [Setup](https://zensical.org/docs/setup/basics/): the settings in `zensical.toml` +- [Migrate from MkDocs](https://zensical.org/docs/compatibility/mkdocs/migration/) + +## Setup + +### Project Layout + +| Path | Contents | +| ---- | -------- | +| `docs/` | A Markdown file for every page, and the images and JavaScript they use | +| `includes/abbreviations.md` | The glossary, which every page gets | +| `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | +| `pyproject.toml`, `uv.lock` | Zensical and the linters, with their locked versions, and the linters' settings | +| `Makefile` | The tasks for previewing, building, and checking the site | + +### Page Tree Example + +Based on this site. Paths in the page tree are relative to `docs/`. + +``` toml +nav = [ + { "Home" = "index.md" }, # Homepage, first tab + { "Setup" = [ # Second tab + "setup/index.md", # Second tab homepage + { "Settings" = "setup/settings.md" }, # Second tab first page + ] }, + { "Reference" = [ # Third tab + { "Zensical" = "reference/zensical.md" }, # Third tab first page (no third tab homepage) + ] }, +] +``` + +### Plugins + +Zensical has its own implementations of popular MkDocs plugins, so they need no installation: + +- [git-revision-date-localized](https://zensical.org/docs/compatibility/mkdocs/plugins/#git-revision-date-localized): + the date of each page's last change, from its Git history +- [social](https://zensical.org/docs/compatibility/mkdocs/plugins/#social): a card for each page, shown when a link to it is shared +- [glightbox](https://zensical.org/docs/compatibility/mkdocs/plugins/#glightbox): opens images in a lightbox +- [llmstxt](https://zensical.org/docs/compatibility/mkdocs/plugins/#llmstxt): `llms.txt` and `llms-full.txt` for language models, + and the "Copy as Markdown" button at the top of each page +- [Search](https://zensical.org/docs/setup/search/), which is always on + +### Drafts + +A page named `*.draft.md` appears when previewing the site with `make serve`, but not in the published site. +See [`draft_docs`](https://zensical.org/docs/setup/basics/#draft_docs). + +## Reference + +Demonstrations of the features I use. Use the "View source" button at the top of this page to see the Markdown syntax used. +View the [authoring guide](https://zensical.org/docs/authoring/markdown/) for what to add to the configuration file to enable a feature. + +### Collapsible blocks, code block formatting, embedding external files + +??? quote "Click to toggle open/close" + + Syntax highlighting for inline code: Python's `#!python range()` function... + + ``` toml title="Embed of pyproject.toml" linenums="1" + --8<-- "pyproject.toml" + ``` + +### Content tabs, icons, glossary + +Markdown: + +=== ":octicons-file-code-16: docs/example.md" + + Use the term (i.e. "WSL"). The glossary is + [appended](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#auto-append-snippets) + to every page, so there is nothing to import. + +=== ":octicons-file-code-16: includes/abbreviations.md" + + Define the term: + + ``` markdown + *[WSL]: Windows Subsystem for Linux + ``` + +Result: + +WSL is a term in the glossary. + +### Table, keyboard keys + +| Shortcut | Description | +| ----------- | ------------------------------------ | +| ++alt++ + (++shift++) + ++tab++ | Navigate between windows | +| ++windows+ctrl++ + ++arrow-left++/++arrow-right++ | Navigate between virtual desktops | +| ++f11++ | Fullscreen | + +### Task list, inline math equations + +- [x] Result of task list +- [ ] Prove $e=mc^2$ + +[KaTeX](https://katex.org/docs/supported) typesets the math. + +### Diagrams, text formatting + +``` mermaid +graph LR + A[Push to main] --> B[Lint] + A --> C[Build] + B --> D[Deploy to GitHub Pages] + C --> D +``` + +==Highlighted==, ^^inserted^^, and ~~deleted~~ text; H~2~O and 2^10^. +See [diagrams](https://zensical.org/docs/authoring/diagrams/) and [formatting](https://zensical.org/docs/authoring/formatting/). + +## Tooling + +[uv](https://docs.astral.sh/uv/) installs the Python version in `.python-version`, Zensical, and the linters, +with the versions locked in `uv.lock`. The Makefile runs each tool through `uv run`: + +| Task | Description | +| ---- | ----------- | +| `make serve` | Preview the site at `http://localhost:8000`, with drafts, rebuilding it as pages change | +| `make build` | Build the site into `site/`, failing on a broken link or anchor | +| `make lint` | Check the Markdown, the spelling, and the GitHub workflows | +| `make format` | Fix what rumdl can in the Markdown | +| `make links` | Check the links to other sites | + +- [rumdl](https://rumdl.dev/flavors/mkdocs/) lints and formats the Markdown. Its `mkdocs` flavor understands + Python Markdown's extensions, such as admonitions, content tabs, and snippets. +- [typos](https://github.com/crate-ci/typos) checks the spelling. +- [actionlint](https://github.com/rhysd/actionlint) checks the workflows for mistakes, + and [zizmor](https://docs.zizmor.sh/audits/) for security problems. +- Each build checks the site's own links and anchors, and [lychee](https://lychee.cli.rs/) checks the links to other sites. + +Dependabot proposes weekly updates for the Python packages and the workflows' actions. +It waits a week before adopting a release, as +[`exclude-newer`](https://docs.astral.sh/uv/reference/settings/#exclude-newer) in `pyproject.toml` does for uv: +most compromised releases are found and pulled within days. + +??? quote "Makefile for this project" + + ``` makefile title="Makefile" linenums="1" + --8<-- "Makefile" + ``` + +## CI / CD Using GitHub Actions + +### Deploy + +The CI workflow runs on every push and pull request to the main branch. +It lints the site and builds it, checking out the whole Git history for the pages' revision dates. +On a push to the main branch, it then deploys the site to GitHub Pages. + +The actions are pinned to commit SHAs, each job only gets the permissions it needs, +and the checkouts don't keep Git credentials: practices that zizmor checks for. + +??? quote "CI workflow for this project" + + ``` yaml title=".github/workflows/ci.yml" linenums="1" + --8<-- ".github/workflows/ci.yml" + ``` + +### Check Links + +Other sites can change at any time, so the Links workflow checks the links to them every Saturday, and on demand. +Sites that refuse automated requests are excluded in `lychee.toml`. + +??? quote "Links workflow for this project" + + ``` yaml title=".github/workflows/links.yml" linenums="1" + --8<-- ".github/workflows/links.yml" + ``` + +### Resources + +- [Schedule workflow runs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) +- [Publish to GitHub Pages with a custom workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) + +## Editors + +### VS Code + +[Zensical Studio](https://zensical.org/studio/) understands Python Markdown and this site's configuration. +It previews pages, completes links, anchors, snippets, and icons, and reports broken links and other problems as I write. +`zensical-studio.toml` turns on its linter. +VS Code recommends Zensical Studio and the rumdl and typos extensions when I open the repository, +and runs the Makefile's tasks from **Terminal > Run Task**. + +### Neovim + +My [Neovim configuration](https://github.com/patrick-5546/dotfiles/tree/main/dot_config/nvim) lints and formats Markdown +with rumdl, which reads this repository's settings from `pyproject.toml`. +I run `make serve` in another terminal to preview the site. + +## Example Sites + +- [Zensical](https://zensical.org/docs/) and [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions/) documentation +- This site! diff --git a/docs/setup/cli/common-cli.md b/docs/setup/cli/common-cli.md index 9a3256b..3c7eb1b 100644 --- a/docs/setup/cli/common-cli.md +++ b/docs/setup/cli/common-cli.md @@ -77,5 +77,3 @@ that can be used to view files and interactively navigate to directories. [Zoxide](https://github.com/ajeetdsouza/zoxide) is an alternative to `cd` that can jump to frequently directories with just a few letters instead of their entire path. - ---8<-- "includes/abbreviations.md" diff --git a/docs/setup/cli/windows-cli.md b/docs/setup/cli/windows-cli.md index 28d4f91..db12053 100644 --- a/docs/setup/cli/windows-cli.md +++ b/docs/setup/cli/windows-cli.md @@ -17,5 +17,3 @@ I primarily use it to install software using [WinGet](https://github.com/microso The CLI of WinGet is pretty complex, so I find UniGetUI useful for managing it in an intuitive way. The complete list of apps I install using UniGetUI can be found [here](https://github.com/patrick-5546/dotfiles/tree/main/reference_dotfiles/wingetui). - ---8<-- "includes/abbreviations.md" diff --git a/docs/setup/gui/windows-gui.md b/docs/setup/gui/windows-gui.md index 922a752..f846748 100644 --- a/docs/setup/gui/windows-gui.md +++ b/docs/setup/gui/windows-gui.md @@ -10,5 +10,3 @@ Some of my favorite Windows GUI applications include: - [OneNote](https://www.microsoft.com/en-ca/microsoft-365/onenote/digital-note-taking-app): note taking, whether typed, handwritten, or annotated - [VLC](https://www.videolan.org/): video player with powerful features that can play any type of video - [WizTree](https://diskanalyzer.com/): quick and visual disk space analyzer - ---8<-- "includes/abbreviations.md" diff --git a/docs/setup/ide.md b/docs/setup/ide.md index af80791..0e34492 100644 --- a/docs/setup/ide.md +++ b/docs/setup/ide.md @@ -109,5 +109,3 @@ wrap up your VS Code configuration with your dependencies in a [Docker](https:// These files are stored in the `.devcontainer/` directory. Example dev container: [UBCSailbot/sailbot_workspace/.devcontainer](https://github.com/UBCSailbot/sailbot_workspace/tree/main/.devcontainer). - ---8<-- "includes/abbreviations.md" diff --git a/docs/setup/index.md b/docs/setup/index.md index cb57fc5..7c2e95c 100644 --- a/docs/setup/index.md +++ b/docs/setup/index.md @@ -36,5 +36,3 @@ To have the same experience on all the computers I use (personal, work, school, - Largely based on my Vim and Microsoft Edge keyboard shortcuts 3. Standardized CLI configuration across shells 4. Wrote these notes so that I remember how everything works - ---8<-- "includes/abbreviations.md" diff --git a/docs/setup/terminals/windows-terminal.md b/docs/setup/terminals/windows-terminal.md index 74f0a1e..a0b0cfb 100644 --- a/docs/setup/terminals/windows-terminal.md +++ b/docs/setup/terminals/windows-terminal.md @@ -62,5 +62,3 @@ I also removed some default shortcuts: - [Windows Terminal 2.0 Roadmap](https://github.com/microsoft/terminal/blob/main/doc/terminal-v2-roadmap.md) - [Windows Terminal specify a starting directory for a SSH profile](https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh#specify-starting-directory) - [Windows Terminal open tab/pane in the current directory](https://docs.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory) - ---8<-- "includes/abbreviations.md" diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index e50d60f..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,126 +0,0 @@ -# Project information -site_name: Patrick's Notes -site_url: https://patrick-5546.github.io/notes/ -site_author: Patrick Creighton - -# Repository -repo_name: patrick-5546/notes -repo_url: https://github.com/patrick-5546/notes -edit_uri: "" - -# Configuration -theme: - name: material - features: - - content.code.annotate - - navigation.expand - - navigation.indexes - - navigation.instant - - navigation.tabs - - navigation.top - - toc.follow - palette: - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: teal - accent: teal - toggle: - icon: material/lightbulb - name: Switch to light mode - - media: "(prefers-color-scheme: light)" - scheme: default - primary: teal - accent: teal - toggle: - icon: material/lightbulb-outline - name: Switch to dark mode - -# Plugins -plugins: - - search - - git-revision-date-localized: - timezone: America/Vancouver - - social - -# Customization -extra: - analytics: - provider: google - property: !ENV GOOGLE_ANALYTICS_KEY - social: - - icon: material/github - link: https://github.com/patrick-5546 - - icon: material/linkedin - link: https://www.linkedin.com/in/patrick-5546/ - - icon: material/email - link: mailto:pcreighton429@gmail.com - -# Extensions -markdown_extensions: - - abbr - - admonition - - attr_list - - footnotes - - md_in_html - - pymdownx.arithmatex: - generic: true - - pymdownx.details - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.highlight: - anchor_linenums: true - - pymdownx.inlinehilite - - pymdownx.keys - - pymdownx.snippets - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - - pymdownx.tasklist: - custom_checkbox: true - - toc: - permalink: true - -extra_javascript: - - javascripts/mathjax.js - - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - -# Page tree -nav: - - Home: index.md - - Setup: - - setup/index.md - - CLI: - - Common: setup/cli/common-cli.md - - Unix: setup/cli/unix-cli.md - - Windows: setup/cli/windows-cli.md - - Terminal: - - Unix: setup/terminals/unix-terminal.md - - Windows: setup/terminals/windows-terminal.md - - IDE: setup/ide.md - - GUI: - - Windows: setup/gui/windows-gui.md - - Internship Preparation: - - internship_prep/index.md # disclaimer: not a learning resource, but for brush up / review / knowledge check - - Applications: internship_prep/applications.md - - Interview Preparation: internship_prep/interview_prep.md - - Hardware Interviews: - - Reference: internship_prep/hardware/hw_reference.md # definitions list for each topic, use abbreviations - - Questions: internship_prep/hardware/hw_questions.md - - Software Interviews: - - Reference: internship_prep/software/sw_reference.md - - Questions: internship_prep/software/sw_questions.md - - Reference: - - Bookmarks: reference/bookmarks.md - - Git: - - Contribution Process: reference/git/git_contributing.md - - Commands: reference/git/git_commands.md - - Advanced Features: reference/git/git_advanced.md - - Unix Commands: reference/unix.md - - Material for MkDocs: reference/mkdocs.md - - Python: reference/python.md - - SSH: reference/ssh.md - - Windows Shortcuts: reference/shortcuts.md - - WSL: reference/wsl.md - - About Me: profile.md diff --git a/zensical.toml b/zensical.toml new file mode 100644 index 0000000..cfeb09e --- /dev/null +++ b/zensical.toml @@ -0,0 +1,196 @@ +[project] +site_name = "Patrick's Notes" +site_url = "https://patrick-5546.github.io/notes/" +site_description = "Patrick Creighton's notes on programming: Windows and Linux setup, internship preparation, and references for Git, Unix and more." +site_author = "Patrick Creighton" +copyright = 'Dedicated to the public domain under CC0 1.0' + +repo_url = "https://github.com/patrick-5546/notes" +repo_name = "patrick-5546/notes" +edit_uri = "edit/main/docs/" + +# Fail the build on a broken link or anchor. +strict = true +# Pages named *.draft.md appear in `make serve`, but not in the published site. +draft_docs = "*.draft.md" + +nav = [ + { "Home" = "index.md" }, + { "Setup" = [ + "setup/index.md", + { "CLI" = [ + { "Common" = "setup/cli/common-cli.md" }, + { "Unix" = "setup/cli/unix-cli.md" }, + { "Windows" = "setup/cli/windows-cli.md" }, + ] }, + { "Terminal" = [ + { "Unix" = "setup/terminals/unix-terminal.md" }, + { "Windows" = "setup/terminals/windows-terminal.md" }, + ] }, + { "IDE" = "setup/ide.md" }, + { "GUI" = [ + { "Windows" = "setup/gui/windows-gui.md" }, + ] }, + ] }, + { "Internship Preparation" = [ + # Disclaimer: not a learning resource, but for brush up / review / knowledge check. + "internship_prep/index.md", + { "Applications" = "internship_prep/applications.md" }, + { "Interview Preparation" = "internship_prep/interview_prep.md" }, + { "Hardware Interviews" = [ + # Definitions list for each topic, use abbreviations. + { "Reference" = "internship_prep/hardware/hw_reference.md" }, + { "Questions" = "internship_prep/hardware/hw_questions.md" }, + ] }, + { "Software Interviews" = [ + { "Reference" = "internship_prep/software/sw_reference.md" }, + { "Questions" = "internship_prep/software/sw_questions.md" }, + ] }, + ] }, + { "Reference" = [ + { "Bookmarks" = "reference/bookmarks.md" }, + { "Git" = [ + { "Contribution Process" = "reference/git/git_contributing.md" }, + { "Commands" = "reference/git/git_commands.md" }, + { "Advanced Features" = "reference/git/git_advanced.md" }, + ] }, + { "Unix Commands" = "reference/unix.md" }, + { "Zensical" = "reference/zensical.md" }, + { "Python" = "reference/python.md" }, + { "SSH" = "reference/ssh.md" }, + { "Windows Shortcuts" = "reference/shortcuts.md" }, + { "WSL" = "reference/wsl.md" }, + ] }, + { "About Me" = "profile.md" }, +] + +# KaTeX typesets the math. +extra_css = [ + "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.css", +] +extra_javascript = [ + "javascripts/katex.js", + "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.js", + "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/contrib/auto-render.min.js", +] + +[project.theme] +language = "en" +favicon = "assets/images/favicon.svg" +features = [ + "announce.dismiss", + "content.action.copy", + "content.action.edit", + "content.action.view", + "content.code.annotate", + "content.code.copy", + "content.code.select", + "content.footnote.tooltips", + "content.tabs.link", + "content.tooltips", + "navigation.expand", + "navigation.footer", + "navigation.indexes", + "navigation.instant", + "navigation.instant.prefetch", + "navigation.path", + "navigation.sections", + "navigation.tabs", + "navigation.top", + "navigation.tracking", + "search.highlight", + "toc.follow", +] + +[project.theme.icon] +logo = "lucide/notebook-pen" +repo = "fontawesome/brands/github" + +[[project.theme.palette]] +media = "(prefers-color-scheme)" +primary = "teal" +accent = "teal" +toggle.icon = "lucide/sun-moon" +toggle.name = "Switch to light mode" + +[[project.theme.palette]] +media = "(prefers-color-scheme: light)" +scheme = "default" +primary = "teal" +accent = "teal" +toggle.icon = "lucide/sun" +toggle.name = "Switch to dark mode" + +[[project.theme.palette]] +media = "(prefers-color-scheme: dark)" +scheme = "slate" +primary = "teal" +accent = "teal" +toggle.icon = "lucide/moon" +toggle.name = "Switch to system preference" + +[[project.extra.social]] +icon = "fontawesome/brands/github" +link = "https://github.com/patrick-5546" +name = "GitHub" + +[[project.extra.social]] +icon = "fontawesome/brands/linkedin" +link = "https://www.linkedin.com/in/patrick-5546/" +name = "LinkedIn" + +[[project.extra.social]] +icon = "fontawesome/solid/envelope" +link = "mailto:pcreighton429@gmail.com" +name = "Email" + +[project.plugins.git-revision-date-localized] +timezone = "America/Vancouver" +# A page that isn't committed yet shows the build date, instead of failing the strict build. +strict = false + +[project.plugins.social] + +[project.plugins.glightbox] + +# llms.txt and llms-full.txt for language models, and a page's "Copy as Markdown" button. +[project.plugins.llmstxt] +full_output = "llms-full.txt" +# A section's pages. In these patterns, `**/` matches one or more folders, but not none. +sections."About" = ["index.md", "profile.md"] +sections."Setup" = ["setup/*.md", "setup/**/*.md"] +sections."Internship Preparation" = ["internship_prep/*.md", "internship_prep/**/*.md"] +sections."Reference" = ["reference/*.md", "reference/**/*.md"] + +[project.markdown_extensions] +abbr = {} +admonition = {} +attr_list = {} +def_list = {} +footnotes = {} +md_in_html = {} +toc.permalink = true +pymdownx.arithmatex.generic = true +pymdownx.betterem = {} +pymdownx.caret = {} +pymdownx.details = {} +pymdownx.emoji.emoji_generator = "zensical.extensions.emoji.to_svg" +pymdownx.emoji.emoji_index = "zensical.extensions.emoji.twemoji" +pymdownx.highlight.anchor_linenums = true +pymdownx.highlight.line_spans = "__span" +pymdownx.highlight.pygments_lang_class = true +pymdownx.inlinehilite = {} +pymdownx.keys = {} +pymdownx.magiclink = {} +pymdownx.mark = {} +pymdownx.smartsymbols = {} +# Every page gets the glossary's abbreviations. A missing file fails the build. +pymdownx.snippets.auto_append = ["includes/abbreviations.md"] +pymdownx.snippets.check_paths = true +pymdownx.superfences.custom_fences = [ + { name = "mermaid", class = "mermaid", format = "pymdownx.superfences.fence_code_format" }, +] +pymdownx.tabbed.alternate_style = true +pymdownx.tabbed.combine_header_slug = true +pymdownx.tasklist.custom_checkbox = true +pymdownx.tilde = {} From 7d81bb3ef1563903ee1b4b1f0acae410474ace39 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:21:04 -0700 Subject: [PATCH 03/19] Lint, build and deploy the site with GitHub Actions The CI workflow lints and builds the site on every push and pull request, and deploys it to GitHub Pages with deploy-pages on every push to main, as Zensical has no gh-deploy command. The site's own links are checked by every strict build, and lychee checks the links to other sites every week and on demand, replacing the scheduled link check, whose configuration file didn't exist. The actions are pinned to commit SHAs, the jobs have only the permissions they need, and the checkouts keep no credentials; actionlint and zizmor check the workflows. Dependabot proposes weekly updates for the actions and the Python packages, a week after their release, and the release notes list them as dependency updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/actionlint.yaml | 6 +++ .github/dependabot.yml | 22 ++++++++ .github/release.yml | 3 ++ .github/workflows/ci.yml | 72 +++++++++++++++++++++++++++ .github/workflows/deploy-docs.yml | 40 --------------- .github/workflows/links.yml | 25 ++++++++++ .github/workflows/lint-docs.yml | 37 -------------- .github/workflows/scheduled_tasks.yml | 20 -------- .markdown-link-check.json | 22 -------- .markdownlint.json | 22 -------- docs/reference/zensical.md | 1 + lychee.toml | 14 ++++++ 12 files changed, 143 insertions(+), 141 deletions(-) create mode 100644 .github/actionlint.yaml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/deploy-docs.yml create mode 100644 .github/workflows/links.yml delete mode 100644 .github/workflows/lint-docs.yml delete mode 100644 .github/workflows/scheduled_tasks.yml delete mode 100644 .markdown-link-check.json delete mode 100644 .markdownlint.json create mode 100644 lychee.toml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000..de3576b --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,6 @@ +# actionlint 1.7.12, its newest release, predates the ubuntu-26.04 runner label and reports it as +# unknown. It is GitHub's own, not a self-hosted runner's; remove it from this list once a release +# knows it (https://github.com/rhysd/actionlint/issues/683). +self-hosted-runner: + labels: + - ubuntu-26.04 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2151adb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + # Wait a week before adopting a new release. + cooldown: + default-days: 7 + groups: + actions: + patterns: ["*"] + + - package-ecosystem: uv + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + groups: + python: + update-types: [minor, patch] diff --git a/.github/release.yml b/.github/release.yml index 0c9c2cd..dfd44c8 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -14,6 +14,9 @@ changelog: - title: Infrastructure Updates labels: - infrastructure + - title: Dependency Updates + labels: + - dependencies - title: Other Changes labels: - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4aaa4f6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + # A newer push to a pull request supersedes its run in progress; runs on main all finish. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + # Fail instead of updating uv.lock, including in the uv runs that make starts. + UV_LOCKED: "1" + +jobs: + lint: + runs-on: ubuntu-26.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + # uv installs the Python that .python-version names. + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 + - name: Lint + env: + # zizmor's online audits check the pinned actions against GitHub. + GH_TOKEN: ${{ github.token }} + run: make lint + + build: + runs-on: ubuntu-26.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Each page's revision date comes from its Git history. + fetch-depth: 0 + persist-credentials: false + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 + - name: Build + run: make build + - name: Upload the site + if: github.event_name == 'push' + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: site + + deploy: + if: github.event_name == 'push' + needs: [lint, build] + runs-on: ubuntu-26.04 + timeout-minutes: 10 + permissions: + # deploy-pages publishes the site, proving the workflow's identity with an OIDC token. + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + # Deploy one push at a time, in order. + concurrency: + group: pages + cancel-in-progress: false + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index 3c811ab..0000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Deploy Docs - -on: - push: - branches: - - main - -jobs: - # https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions - deploy: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - fetch-depth: '0' # checkout all commits to get the actual page revision time - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.x - - - name: Generate cache ID - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - - name: Cache social plugin files - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - - name: Install Python dependencies - run: pip install -r docs/requirements.txt - - - name: Deploy MkDocs application - env: - GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} - run: mkdocs gh-deploy --force diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..a9d59b5 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,25 @@ +name: Links + +# Other sites can change at any time, so lychee checks the links to them every week, and on demand. +# The site's own links are checked by every build. +on: + schedule: + # Every Saturday at 11:00 UTC + - cron: "0 11 * * 6" + workflow_dispatch: + +permissions: + contents: read + +jobs: + lychee: + runs-on: ubuntu-26.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + # Reads lychee.toml. GitHub's token raises its rate limit for github.com links. + - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 + with: + args: --no-progress docs includes README.md diff --git a/.github/workflows/lint-docs.yml b/.github/workflows/lint-docs.yml deleted file mode 100644 index e8bdc3b..0000000 --- a/.github/workflows/lint-docs.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Lint Docs - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - # https://github.com/nosborn/github-action-markdown-cli - markdownlint: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Lint markdown pages - uses: nosborn/github-action-markdown-cli@v3.0.1 - with: - files: 'docs/* includes/* README.md' - config_file: '.markdownlint.json' - - # https://github.com/gaurav-nelson/github-action-markdown-link-check - markdown-link-check: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Check markdown pages for broken links - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: '.markdown-link-check.json' - folder-path: 'docs, includes' - file-path: './README.md' diff --git a/.github/workflows/scheduled_tasks.yml b/.github/workflows/scheduled_tasks.yml deleted file mode 100644 index 22063c9..0000000 --- a/.github/workflows/scheduled_tasks.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Scheduled Tasks - -on: - schedule: - # Every Saturday at 11:00am UTC - - cron: '0 11 * * 6' - -jobs: - # https://github.com/gaurav-nelson/github-action-markdown-link-check - markdown-link-check: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Check markdown pages for broken links - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: '.mlc_config.json' - folder-path: 'docs, includes' diff --git a/.markdown-link-check.json b/.markdown-link-check.json deleted file mode 100644 index 1dc7d2b..0000000 --- a/.markdown-link-check.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "^http://asic.co.in/" - }, - { - "pattern": "^https://docs.github.com/" - }, - { - "pattern": "^https://leetcode.com/" - }, - { - "pattern": "^https://linuxize.com/" - }, - { - "pattern": "^https://www.linkedin.com/" - }, - { - "pattern": "^https://www.interviewbit.com/" - } - ] -} diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index bb15b4f..0000000 --- a/.markdownlint.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "default": true, - "MD013": { - "line_length": 180, - "tables": false - }, - "MD004": { - "style": "dash" - }, - "MD007": { - "indent": 4 - }, - "MD033": { - "allowed_elements": ["figure", "figcaption"] - }, - "MD035": { - "style": "---" - }, - "MD040": false, - "MD041": false, - "MD046": false -} diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index f5ba367..b97e2c9 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -26,6 +26,7 @@ and it is where the team now develops new features, so I moved the site to it. | `includes/abbreviations.md` | The glossary, which every page gets | | `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | | `pyproject.toml`, `uv.lock` | Zensical and the linters, with their locked versions, and the linters' settings | +| `lychee.toml` | The settings for checking the links to other sites | | `Makefile` | The tasks for previewing, building, and checking the site | ### Page Tree Example diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 0000000..6dae99c --- /dev/null +++ b/lychee.toml @@ -0,0 +1,14 @@ +# lychee checks the links to other sites; `zensical build` checks the site's own links and anchors. +scheme = ["https", "http"] + +# Sites that refuse automated requests, answering with an error for pages that exist. +exclude = [ + # 999 for every profile + "^https://www\\.linkedin\\.com/", + # 403 behind Cloudflare's bot protection + "^https://stackoverflow\\.com/", +] + +# Reuse results for a day, when checking again locally. +cache = true +max_cache_age = "1d" From 5c09cccfdff5ae9ee7eb731ebf0b0cfa1593e18f Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:21:13 -0700 Subject: [PATCH 04/19] Fix typos, broken links, and the glossary's definition of RAM typos found four misspellings, beside one of which "Bread-first search" was a fifth, and rumdl found three links titled "here". lychee found eight broken URLs: - Six to dotfiles that patrick-5546/dotfiles#7 removed. The pages describe those files, so the links point to the last commit that had them. - Two to pages that no longer exist, which link to the Internet Archive's copies instead. The glossary defined RAM as "Read Access Memory", which every page's tooltip now shows, as each page gets the glossary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/internship_prep/applications.md | 2 +- docs/internship_prep/interview_prep.md | 2 +- docs/internship_prep/software/sw_questions.md | 2 +- docs/internship_prep/software/sw_reference.md | 4 ++-- docs/reference/git/git_contributing.md | 2 +- docs/setup/cli/common-cli.md | 6 +++--- docs/setup/cli/unix-cli.md | 6 +++--- docs/setup/cli/windows-cli.md | 2 +- docs/setup/terminals/unix-terminal.md | 4 ++-- includes/abbreviations.md | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/internship_prep/applications.md b/docs/internship_prep/applications.md index 491006c..bd51b70 100644 --- a/docs/internship_prep/applications.md +++ b/docs/internship_prep/applications.md @@ -34,7 +34,7 @@ In economic terms, my strategy has a high upfront cost, but minimal recurring co - Shorten resume by cutting experiences: consider relevance to the position and similarity to other experiences - Can put everything on LinkedIn and link to your profile in the resume - Can have multiple resumes for different types of jobs (e.g., software, firmware, hardware) -- Lengthen resume by padding experiences: consider mentioning transferrable soft skills +- Lengthen resume by padding experiences: consider mentioning transferable soft skills - For example, Agile methodologies, proactive/self-motivated nature, leadership, communication, documentation - If you don't have many relevant experiences, considering adding sections on work/volunteer experience and non-technical interests to differentiate yourself from other applicants diff --git a/docs/internship_prep/interview_prep.md b/docs/internship_prep/interview_prep.md index 8de8e92..1302580 100644 --- a/docs/internship_prep/interview_prep.md +++ b/docs/internship_prep/interview_prep.md @@ -25,7 +25,7 @@ Good topics to practice talking about include: - Collaborating with colleagues to find the best possible solution - Receptive to feedback and varying perspectives - - Each person has different strenghts + - Each person has different strengths - Bottom up approach - reusability, test each small part - Besides performance, consider reliability, sustainable, and reparability diff --git a/docs/internship_prep/software/sw_questions.md b/docs/internship_prep/software/sw_questions.md index 44c6bf2..9c0c5dc 100644 --- a/docs/internship_prep/software/sw_questions.md +++ b/docs/internship_prep/software/sw_questions.md @@ -39,4 +39,4 @@ Similar or even identical questions can be found on LeetCode. - List vs array - Performance advantage of Numpy - C/C++ questions - - See [Top Embedded C Interview Questions](https://www.interviewbit.com/embedded-c-interview-questions/) + - See [Top Embedded C Interview Questions](https://web.archive.org/web/20260612021224/https://www.interviewbit.com/embedded-c-interview-questions/) diff --git a/docs/internship_prep/software/sw_reference.md b/docs/internship_prep/software/sw_reference.md index 7d37fb2..038b672 100644 --- a/docs/internship_prep/software/sw_reference.md +++ b/docs/internship_prep/software/sw_reference.md @@ -43,7 +43,7 @@ Implement: - Search for relevant Reddit posts - Can filter LeetCode problems by company using [LeetCode Patterns](https://seanprashad.com/leetcode-patterns/) - There may be an up-to-date repository that sorts Leetcode problems asked by companies by frequency - - [Here](https://github.com/hxu296/leetcode-company-wise-problems-2022) is the repository for 2022 (last updated May 2022) + - [The repository for 2022](https://github.com/hxu296/leetcode-company-wise-problems-2022) (last updated May 2022) #### After an online assessment or interview @@ -116,7 +116,7 @@ For more, see Programiz [adjacency list](https://www.programiz.com/dsa/graph-adj Comparing two popular search algorithms. -| Basis for comparision | Bread-first search | Depth-first search | +| Basis for comparison | Breadth-first search | Depth-first search | | --------------------- | ------------------------------------- | ------------------ | | Edge types | Discovery and cross | Discovery and back | | Implemented using | Queue | Stack | diff --git a/docs/reference/git/git_contributing.md b/docs/reference/git/git_contributing.md index 85a33c4..1683bf3 100644 --- a/docs/reference/git/git_contributing.md +++ b/docs/reference/git/git_contributing.md @@ -39,7 +39,7 @@ Creating a pull request: - Add reviewers to test the pull request - Once the pull request is ready to merge into the main branch, I recommend the "Squash and Merge" merge method to keep the main branch commit history clear and concise, or "Rebase and Merge" for hotfixes and one off commits - - Learn more about GitHub merge types and best practices [here](https://rietta.com/blog/github-merge-types/) + - Learn more about [GitHub merge types and best practices](https://rietta.com/blog/github-merge-types/) ## Updating your local repository diff --git a/docs/setup/cli/common-cli.md b/docs/setup/cli/common-cli.md index 3c7eb1b..8d4c41c 100644 --- a/docs/setup/cli/common-cli.md +++ b/docs/setup/cli/common-cli.md @@ -13,7 +13,7 @@ Configuration files: - Unix: [`.config/zsh/aliases.zsh`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/zsh/aliases.zsh) - Windows: [`Documents/PowerShell/aliases.ps1`](https://github.com/patrick-5546/dotfiles/blob/main/Documents/PowerShell/aliases.ps1) -- Git (aliases are at the bottom): [`.gitconfig`](https://github.com/patrick-5546/dotfiles/blob/main/dot_gitconfig.tmpl) +- Git (aliases are at the bottom): [`.gitconfig`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/dot_gitconfig.tmpl) ### Functions @@ -35,7 +35,7 @@ Configuration files: See [Contributing to a Git Repository](../../reference/git/git_contributing.md) and [Git Commands](../../reference/git/git_commands.md) for my notes on Git. -Configuration file: [`.gitconfig`](https://github.com/patrick-5546/dotfiles/blob/main/dot_gitconfig.tmpl). +Configuration file: [`.gitconfig`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/dot_gitconfig.tmpl). #### Git CLI @@ -44,7 +44,7 @@ but I mainly use it to login to GitHub. #### Delta -[Delta](https://github.com/dandavison/delta) is a syntax-highting pager for git, diff, and grep output. +[Delta](https://github.com/dandavison/delta) is a syntax-highlighting pager for git, diff, and grep output. It makes `git diff` so much easier to understand. #### Lazygit diff --git a/docs/setup/cli/unix-cli.md b/docs/setup/cli/unix-cli.md index 4e8b954..2178563 100644 --- a/docs/setup/cli/unix-cli.md +++ b/docs/setup/cli/unix-cli.md @@ -4,7 +4,7 @@ Zsh is a shell for Unix. -Configuration file: [`.zshrc`](https://github.com/patrick-5546/dotfiles/blob/main/dot_zshrc.tmpl). +Configuration file: [`.zshrc`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/dot_zshrc.tmpl). Resources: @@ -26,7 +26,7 @@ changed the cursor shape for different modes, and mapped `jk` to exit insert mod I use a fork of it in my installation script because it is lightweight, fast, doesn't require sudo permissions, and works on both MacOS and Linux. -Installation script: [`run_install-unix.sh.tmpl`](https://github.com/patrick-5546/dotfiles/blob/main/run_install-unix.sh.tmpl). +Installation script: [`run_install-unix.sh.tmpl`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/run_install-unix.sh.tmpl). ### Atuin @@ -46,7 +46,7 @@ Configuration files: [Bpytop](https://github.com/aristocratos/bpytop) is a detailed and aesthetic CLI resource monitor. -Configuration file: [`.config/bpytop/bpytop.conf`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/bpytop/bpytop.conf). +Configuration file: [`.config/bpytop/bpytop.conf`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/dot_config/bpytop/bpytop.conf). ### Dust diff --git a/docs/setup/cli/windows-cli.md b/docs/setup/cli/windows-cli.md index db12053..7488df1 100644 --- a/docs/setup/cli/windows-cli.md +++ b/docs/setup/cli/windows-cli.md @@ -16,4 +16,4 @@ This module brings the Unix CLI experience to PowerShell. I use it to add Vi mod I primarily use it to install software using [WinGet](https://github.com/microsoft/winget-cli), the official Windows package manager. The CLI of WinGet is pretty complex, so I find UniGetUI useful for managing it in an intuitive way. -The complete list of apps I install using UniGetUI can be found [here](https://github.com/patrick-5546/dotfiles/tree/main/reference_dotfiles/wingetui). +See the [complete list of apps I install using UniGetUI](https://github.com/patrick-5546/dotfiles/tree/eb8f064343f863cb1b8227b03b62782bcf5eed64/reference_dotfiles/wingetui). diff --git a/docs/setup/terminals/unix-terminal.md b/docs/setup/terminals/unix-terminal.md index cfe7304..cec4bc5 100644 --- a/docs/setup/terminals/unix-terminal.md +++ b/docs/setup/terminals/unix-terminal.md @@ -10,7 +10,7 @@ This is what my Unix terminal configuration looks like on Ubuntu 18.04. [Alacritty](https://github.com/alacritty/alacritty) is a fast, aesthetic, and customizable terminal emulator. -Configuration file: [`.dot_alacritty.toml`](https://github.com/patrick-5546/dotfiles/blob/main/dot_alacritty.toml). +Configuration file: [`.dot_alacritty.toml`](https://github.com/patrick-5546/dotfiles/blob/eb8f064343f863cb1b8227b03b62782bcf5eed64/dot_alacritty.toml). ## Tmux @@ -23,5 +23,5 @@ Configuration file: [`.tmux.conf`](https://github.com/patrick-5546/dotfiles/blob Resources: -- [Useful Tmux Configuration Examples](https://dev.to/iggredible/useful-tmux-configuration-examples-k3g) +- [Useful Tmux Configuration Examples](https://web.archive.org/web/20240621183314/https://dev.to/iggredible/useful-tmux-configuration-examples-k3g) - [A Guide to Customizing your tmux.conf](https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/) diff --git a/includes/abbreviations.md b/includes/abbreviations.md index de8bad0..2cb8e7f 100644 --- a/includes/abbreviations.md +++ b/includes/abbreviations.md @@ -20,7 +20,7 @@ *[OS]: Operating System *[OOP]: Object-Oriented Programming *[PLLs]: Phase-Locked Loops -*[RAM]: Read Access Memory +*[RAM]: Random Access Memory *[ROM]: Read-Only Memory *[SRAM]: Static Random Access Memory *[STA]: Static Timing Analysis From 05f5bad6bda2cbe9ae2121987fbbba32bb395c48 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:21:28 -0700 Subject: [PATCH 05/19] Set up VS Code for Zensical Studio VS Code recommends Zensical Studio, which previews the pages and checks their links, snippets and icons as you write, and the rumdl and typos extensions in place of markdownlint and Code Spell Checker. zensical-studio.toml turns on Studio's linter. The tasks run the Makefile's, replacing the launch configurations that ran `mkdocs serve` through debugpy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .vscode/cspell.json | 40 --------------------------------- .vscode/extensions.json | 21 +++++++++++------ .vscode/launch.json | 46 -------------------------------------- .vscode/settings.json | 18 +++++---------- .vscode/tasks.json | 37 ++++++++++++++++++++++++++++++ docs/reference/zensical.md | 1 + zensical-studio.toml | 7 ++++++ 7 files changed, 64 insertions(+), 106 deletions(-) delete mode 100644 .vscode/cspell.json delete mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 zensical-studio.toml diff --git a/.vscode/cspell.json b/.vscode/cspell.json deleted file mode 100644 index e84b1fa..0000000 --- a/.vscode/cspell.json +++ /dev/null @@ -1,40 +0,0 @@ -// cSpell Settings -{ - // Version of the setting file. Always 0.2 - "version": "0.2", - // language - current active spelling language - "language": "en", - // words - list of words to be always considered correct - "words": [ - "alacritty", - "amix", - "bpytop", - "chezmoi", - "choco", - "debloat", - "devcontainer", - "dotfiles", - "homelab", - "Neovim", - "nvim", - "ripgrep", - "roadmap", - "sailbot", - "subfolders", - "tylerlum", - "unstage", - "vimrc", - "winget" - ], - // flagWords - list of words to be always considered incorrect - // This is useful for offensive words and common spelling errors. - // For example "hte" should be "the" - "flagWords": [ - "hte" - ], - "ignorePaths": [ - "LICENSE.md", - "mkdocs.yml", - ".git" - ] -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 36f6d3e..a6004db 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,15 @@ { - "recommendations": [ - "davidanson.vscode-markdownlint", - "ms-python.python", - "redhat.vscode-yaml", - "streetsidesoftware.code-spell-checker" - ] -} \ No newline at end of file + "recommendations": [ + "editorconfig.editorconfig", + "github.vscode-github-actions", + "redhat.vscode-yaml", + "rvben.rumdl", + "tamasfe.even-better-toml", + "tekumara.typos-vscode", + "zensical.zensical-studio" + ], + "unwantedRecommendations": [ + // rumdl and Zensical Studio lint the Markdown, understanding Python Markdown's extensions. + "davidanson.vscode-markdownlint" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 1ac5a5e..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Run Application", - "type": "debugpy", - "request": "launch", - "module": "mkdocs", - "args": [ - "serve" - ], - "console": "internalConsole", - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": "Launch Chrome", - "presentation": { - "hidden": true, - }, - "request": "launch", - "type": "chrome", - "url": "http://localhost:8000" - }, - { - "name": "Launch Edge", - "presentation": { - "hidden": true, - }, - "request": "launch", - "type": "msedge", - "url": "http://localhost:8000" - } - ], - "compounds": [ - { - "name": "Launch Application in Chrome", - "configurations": ["Run Application", "Launch Chrome"], - "stopAll": true - }, - { - "name": "Launch Application in Edge", - "configurations": ["Run Application", "Launch Edge"], - "stopAll": true - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 12aae20..8426045 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,14 +1,6 @@ { - "cSpell.enabled": true, - "yaml.schemas": { - "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" - }, - "yaml.customTags": [ - "!ENV scalar", - "!ENV sequence", - "!relative scalar", - "tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg", - "tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji", - "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format" - ], -} \ No newline at end of file + // Zensical Studio formats the pages in docs/, as Python Markdown, and rumdl the other Markdown files. + "[markdown]": { + "editor.defaultFormatter": "rvben.rumdl" + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f3fd25f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,37 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Serve", + "detail": "Preview the site, with drafts, rebuilding it as pages change", + "type": "shell", + "command": "make serve", + "problemMatcher": [] + }, + { + "label": "Build", + "detail": "Build the site into site/, as CI does; a broken link fails it", + "type": "shell", + "command": "make build", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Lint", + "detail": "Markdown, spelling and the GitHub workflows", + "type": "shell", + "command": "make lint", + "problemMatcher": [] + }, + { + "label": "Format", + "detail": "Fix what rumdl can in Markdown", + "type": "shell", + "command": "make format", + "problemMatcher": [] + } + ] +} diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index b97e2c9..1b74662 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -26,6 +26,7 @@ and it is where the team now develops new features, so I moved the site to it. | `includes/abbreviations.md` | The glossary, which every page gets | | `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | | `pyproject.toml`, `uv.lock` | Zensical and the linters, with their locked versions, and the linters' settings | +| `zensical-studio.toml` | Zensical Studio's lint rules | | `lychee.toml` | The settings for checking the links to other sites | | `Makefile` | The tasks for previewing, building, and checking the site | diff --git a/zensical-studio.toml b/zensical-studio.toml new file mode 100644 index 0000000..39ac165 --- /dev/null +++ b/zensical-studio.toml @@ -0,0 +1,7 @@ +# Turns on Zensical Studio's linter, with its default rules, and the checks for each page's single +# title that rumdl also makes (MD025 and MD041). +version = 1 + +[lint.rules] +document.first-heading-h1 = "warning" +heading.multiple-h1 = "warning" From 159c5ea521647ab8453560e89d9db15a518427fa Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 17:21:28 -0700 Subject: [PATCH 06/19] Document the setup in the README, and add agent instructions The README covers setup, tasks, writing pages, Neovim and VS Code, updating dependencies and conventions. The Zensical page links to it for the tasks, the editors and updating dependencies, instead of repeating them, and keeps explaining how the site is built. AGENTS.md points agents to the README, and lists the checks to run before finishing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- AGENTS.md | 9 ++++ README.md | 93 ++++++++++++++++++++++++++++++-------- docs/reference/zensical.md | 33 ++------------ 3 files changed, 87 insertions(+), 48 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..fcdbbaf --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,9 @@ +# Agent instructions + +Before changing the site, read `README.md`, and follow its "Writing Notes" section. +Each page is a Markdown file in `docs/`, written in Python Markdown with the extensions that +`zensical.toml` enables; the [authoring guide](https://zensical.org/docs/authoring/markdown/) describes +the syntax. `make help` is the command reference. + +Before finishing, run `make lint` and `make build`, plus `make links` after adding or changing links +to other sites. If a check's tool is missing, say which checks did not run. diff --git a/README.md b/README.md index 1fd0c1b..00b8c36 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,91 @@ # notes -Website for my notes on various programming-related topics. +My notes on various programming-related topics, published at . +The site is built with [Zensical](https://zensical.org/), and its +[Zensical page](https://patrick-5546.github.io/notes/reference/zensical/) explains how, +from the repository's layout to CI and deployment. ## Setup -1. Clone repository +Install [uv](https://docs.astral.sh/uv/getting-started/installation/), GNU make 4 or newer, and Git. +Then clone the repository and install its dependencies: - ``` - git clone https://github.com/patrick-5546/notes.git - ``` +```sh +git clone https://github.com/patrick-5546/notes.git +cd notes +uv sync +``` -2. Install dependencies +`uv sync` installs the Python version in `.python-version`, Zensical, and the linters into `.venv/`, at the versions in `uv.lock`. +Each task runs its tool with `uv run`, which keeps `.venv/` up to date first, so there's no need to activate it. - ``` - pip install -r docs/requirements.txt - ``` +On macOS, the tasks stop at once under its own make, GNU make 3.81, which is too old. +Install a newer one with `brew install make`, which names it `gmake`; +to run it as `make`, put `$(brew --prefix make)/libexec/gnubin` first on `PATH`. +On Windows, run the tasks in WSL. - - Can do this in a [Python virtual environment](https://patrick-5546.github.io/notes/reference/python/#virtual-environments) +## Commands -3. Manually install [social plugin OS dependencies](https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/#cairo-graphics) +| Command | Description | +| ------- | ----------- | +| `make serve` | Preview the site at `http://localhost:8000`, with drafts, rebuilding it as pages change | +| `make build` | Build the site into `site/`, as CI does; a broken link or anchor fails it | +| `make lint` | Check the Markdown with rumdl, the spelling with typos, and the GitHub workflows with actionlint and zizmor | +| `make format` | Fix what rumdl can in the Markdown | +| `make links` | Check the links to other sites with [lychee](https://lychee.cli.rs/), which needs installing separately | +| `make clean` | Remove the built site and the build caches | -## Run +`make help` lists the tasks. zizmor runs its online audits when `GH_TOKEN` is set, +and lychee gets a higher rate limit for github.com links when `GITHUB_TOKEN` is: +for example, `GH_TOKEN=$(gh auth token) make lint`. + +## Writing Notes + +- Each page is a Markdown file in `docs/`, written in Python Markdown with the extensions that `zensical.toml` enables. + The [authoring guide](https://zensical.org/docs/authoring/markdown/) describes the syntax. +- Add a new page to `nav` in `zensical.toml`. + The build doesn't warn about a page missing from it, which only its URL would then reach. +- Indent the content nested in lists, admonitions, and content tabs by four spaces. +- Define an abbreviation in `includes/abbreviations.md`, which every page gets. +- Name a page that isn't ready `.draft.md`: `make serve` shows it, and the published site leaves it out. + +## Editors + +### Neovim + +My [Neovim configuration](https://github.com/patrick-5546/dotfiles/tree/main/dot_config/nvim) lints and formats +the Markdown with rumdl, which reads the settings in `pyproject.toml`. +Run `make serve` in another terminal to preview the site. ### VS Code -1. `CTRL+P` to open Quick Open -2. Run a launch configuration - - "debug Run Application" runs `mkdocs serve` - - "debug Launch Application" runs `mkdocs serve` and opens the application in a new Microsoft Edge window +Opening the repository recommends the extensions in `.vscode/extensions.json`: + +- [Zensical Studio](https://zensical.org/studio/) previews the pages, completes links, anchors, snippets, and icons, + and reports problems such as broken links as you write; `zensical-studio.toml` configures its linter. + It reads the icons from Zensical in `.venv/`, so run `uv sync` first. +- rumdl lints and formats the other Markdown files, such as this one. Zensical Studio handles the pages in `docs/`. +- typos checks the spelling. + +**Terminal > Run Task** runs the tasks, and **Build** is the default build task. + +## Updating Dependencies + +Dependabot proposes weekly updates for the Python packages and the workflows' actions, in one pull request per ecosystem; +major Python updates come separately. +Most compromised releases are found and pulled within days, so every update takes only releases at least a week old: +Dependabot waits a week, and `exclude-newer` in `pyproject.toml` sets the limit for uv. +To update by hand: + +- **Python packages:** edit `pyproject.toml` if needed, then run `uv lock --upgrade`. +- **KaTeX:** change its version in the jsDelivr URLs in `zensical.toml`, to a + [release](https://github.com/KaTeX/KaTeX/releases) at least a week old. + +## Conventions + +Commit subjects are imperative, without a final period, such as "Add a page about Docker". +Pull requests are squash-merged, and labelled `new`, `update`, or `infrastructure` for the release notes. -### Command Line +## License -1. `mkdocs serve` +[CC0 1.0 Universal](LICENSE.md) diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index 1b74662..9f4c46b 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -132,15 +132,9 @@ See [diagrams](https://zensical.org/docs/authoring/diagrams/) and [formatting](h ## Tooling [uv](https://docs.astral.sh/uv/) installs the Python version in `.python-version`, Zensical, and the linters, -with the versions locked in `uv.lock`. The Makefile runs each tool through `uv run`: - -| Task | Description | -| ---- | ----------- | -| `make serve` | Preview the site at `http://localhost:8000`, with drafts, rebuilding it as pages change | -| `make build` | Build the site into `site/`, failing on a broken link or anchor | -| `make lint` | Check the Markdown, the spelling, and the GitHub workflows | -| `make format` | Fix what rumdl can in the Markdown | -| `make links` | Check the links to other sites | +with the versions locked in `uv.lock`. The Makefile runs each tool through `uv run`. +The [README](https://github.com/patrick-5546/notes) lists its tasks and the editor setup, +and explains how the dependencies are updated. - [rumdl](https://rumdl.dev/flavors/mkdocs/) lints and formats the Markdown. Its `mkdocs` flavor understands Python Markdown's extensions, such as admonitions, content tabs, and snippets. @@ -149,11 +143,6 @@ with the versions locked in `uv.lock`. The Makefile runs each tool through `uv r and [zizmor](https://docs.zizmor.sh/audits/) for security problems. - Each build checks the site's own links and anchors, and [lychee](https://lychee.cli.rs/) checks the links to other sites. -Dependabot proposes weekly updates for the Python packages and the workflows' actions. -It waits a week before adopting a release, as -[`exclude-newer`](https://docs.astral.sh/uv/reference/settings/#exclude-newer) in `pyproject.toml` does for uv: -most compromised releases are found and pulled within days. - ??? quote "Makefile for this project" ``` makefile title="Makefile" linenums="1" @@ -193,22 +182,6 @@ Sites that refuse automated requests are excluded in `lychee.toml`. - [Schedule workflow runs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) - [Publish to GitHub Pages with a custom workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) -## Editors - -### VS Code - -[Zensical Studio](https://zensical.org/studio/) understands Python Markdown and this site's configuration. -It previews pages, completes links, anchors, snippets, and icons, and reports broken links and other problems as I write. -`zensical-studio.toml` turns on its linter. -VS Code recommends Zensical Studio and the rumdl and typos extensions when I open the repository, -and runs the Makefile's tasks from **Terminal > Run Task**. - -### Neovim - -My [Neovim configuration](https://github.com/patrick-5546/dotfiles/tree/main/dot_config/nvim) lints and formats Markdown -with rumdl, which reads this repository's settings from `pyproject.toml`. -I run `make serve` in another terminal to preview the site. - ## Example Sites - [Zensical](https://zensical.org/docs/) and [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions/) documentation From d8e082c6d5b48ab62f87fff4529a775a1f1ab18d Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 19:44:20 -0700 Subject: [PATCH 07/19] Document the ruleset that protects main Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00b8c36..c0881cf 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,10 @@ To update by hand: ## Conventions -Commit subjects are imperative, without a final period, such as "Add a page about Docker". +Changes reach main through pull requests, which a ruleset lets merge only once the `lint` and `build` checks pass +and every conversation is resolved; `gh pr merge --auto --squash` merges one as soon as they are. Pull requests are squash-merged, and labelled `new`, `update`, or `infrastructure` for the release notes. +Commit subjects are imperative, without a final period, such as "Add a page about Docker". ## License From 60d25a276d0aef3bd83bfd15f50be7d736cbcb39 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 30 Nov 2026 20:31:44 -0700 Subject: [PATCH 08/19] Deploy the site in its own workflow The deploy job was part of the CI workflow, so pull requests listed it as a skipped check. The Deploy workflow runs on every push to main and on demand, as Zensical's own documentation does, with a build job that can only read the repository and a deploy job that alone can publish to GitHub Pages. CI lints and builds, the two checks that the ruleset protecting main requires. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 26 +---------------- .github/workflows/deploy.yml | 54 ++++++++++++++++++++++++++++++++++++ docs/reference/zensical.md | 27 +++++++++++++----- 3 files changed, 75 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4aaa4f6..d2288c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,30 +43,6 @@ jobs: fetch-depth: 0 persist-credentials: false - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 + # A broken link or anchor, or a missing snippet, fails the build. - name: Build run: make build - - name: Upload the site - if: github.event_name == 'push' - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 - with: - path: site - - deploy: - if: github.event_name == 'push' - needs: [lint, build] - runs-on: ubuntu-26.04 - timeout-minutes: 10 - permissions: - # deploy-pages publishes the site, proving the workflow's identity with an OIDC token. - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - # Deploy one push at a time, in order. - concurrency: - group: pages - cancel-in-progress: false - steps: - - id: deployment - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0f5eb37 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,54 @@ +name: Deploy + +# Deploys the site to GitHub Pages on every push to main, and on demand. The CI workflow checks pull +# requests, which the ruleset that protects main only lets merge once they pass. +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +# Deploy one push at a time, in order. +concurrency: + group: pages + cancel-in-progress: false + +env: + # Fail instead of updating uv.lock, including in the uv runs that make starts. + UV_LOCKED: "1" + +jobs: + build: + runs-on: ubuntu-26.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Each page's revision date comes from its Git history. + fetch-depth: 0 + persist-credentials: false + # uv installs the Python that .python-version names. + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 + - name: Build + run: make build + - name: Upload the site + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: site + + deploy: + needs: build + runs-on: ubuntu-26.04 + timeout-minutes: 10 + permissions: + # deploy-pages publishes the site, proving the workflow's identity with an OIDC token. + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index 9f4c46b..e43aaf5 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -120,10 +120,11 @@ WSL is a term in the glossary. ``` mermaid graph LR - A[Push to main] --> B[Lint] + A[Pull request] --> B[Lint] A --> C[Build] - B --> D[Deploy to GitHub Pages] + B --> D[Merge to main] C --> D + D --> E[Deploy to GitHub Pages] ``` ==Highlighted==, ^^inserted^^, and ~~deleted~~ text; H~2~O and 2^10^. @@ -151,14 +152,12 @@ and explains how the dependencies are updated. ## CI / CD Using GitHub Actions -### Deploy +### Lint and Build The CI workflow runs on every push and pull request to the main branch. It lints the site and builds it, checking out the whole Git history for the pages' revision dates. -On a push to the main branch, it then deploys the site to GitHub Pages. - -The actions are pinned to commit SHAs, each job only gets the permissions it needs, -and the checkouts don't keep Git credentials: practices that zizmor checks for. +The build is the check for broken links and anchors, and missing snippets. +A ruleset only lets a pull request merge into the main branch once both jobs pass. ??? quote "CI workflow for this project" @@ -166,6 +165,20 @@ and the checkouts don't keep Git credentials: practices that zizmor checks for. --8<-- ".github/workflows/ci.yml" ``` +### Deploy + +The Deploy workflow builds the site again on every push to the main branch, and on demand, +then deploys it to GitHub Pages. Only its deploy job can publish the site. + +The actions are pinned to commit SHAs, each job only gets the permissions it needs, +and the checkouts don't keep Git credentials: practices that zizmor checks for. + +??? quote "Deploy workflow for this project" + + ``` yaml title=".github/workflows/deploy.yml" linenums="1" + --8<-- ".github/workflows/deploy.yml" + ``` + ### Check Links Other sites can change at any time, so the Links workflow checks the links to them every Saturday, and on demand. From c45c32440f03cc729ede5c274465373dbfeaac11 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:30:51 -0700 Subject: [PATCH 09/19] Rename the license file to LICENSE LICENSE.md holds CC0's plain-text legal code, whose indented paragraphs GitHub rendered as code blocks. LICENSE is the usual name, which GitHub also detects, and rumdl no longer needs to skip it. The README's License section goes too: GitHub shows the license, and the site's footer states it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- LICENSE.md => LICENSE | 0 README.md | 4 ---- pyproject.toml | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) rename LICENSE.md => LICENSE (100%) diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.md b/README.md index c0881cf..74ebefc 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,3 @@ Changes reach main through pull requests, which a ruleset lets merge only once t and every conversation is resolved; `gh pr merge --auto --squash` merges one as soon as they are. Pull requests are squash-merged, and labelled `new`, `update`, or `infrastructure` for the release notes. Commit subjects are imperative, without a final period, such as "Add a page about Docker". - -## License - -[CC0 1.0 Universal](LICENSE.md) diff --git a/pyproject.toml b/pyproject.toml index e07140b..a950404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ exclude-newer = "7 days" flavor = "mkdocs" # Code blocks without a language, such as shell commands. disable = ["MD040"] -# The license's legal text, and the issue template's bold prompts and blank lines to fill in. -exclude = ["LICENSE.md", ".github/ISSUE_TEMPLATE"] +# The issue template's bold prompts, and its blank lines to fill in. +exclude = [".github/ISSUE_TEMPLATE"] [tool.rumdl.MD004] style = "dash" From e169b533bd333450afcc385b721aedc6dca66d8b Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:31:32 -0700 Subject: [PATCH 10/19] Lint the Markdown with rumdl's defaults for MkDocs The settings came from the old markdownlint config. rumdl's MkDocs flavor already requires the four-space nesting that Python Markdown needs, and its defaults keep each file's list markers and rules consistent, so those settings go. There's no line length limit, as in Zensical's own docs. Code blocks name their language, for the right highlighting: shell commands are sh, and diagrams and pseudocode are text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/internship_prep/hardware/hw_reference.md | 2 +- docs/reference/git/git_advanced.md | 16 ++++++------- docs/reference/python.md | 4 ++-- pyproject.toml | 24 ++++--------------- 4 files changed, 16 insertions(+), 30 deletions(-) diff --git a/docs/internship_prep/hardware/hw_reference.md b/docs/internship_prep/hardware/hw_reference.md index c21676b..0684a06 100644 --- a/docs/internship_prep/hardware/hw_reference.md +++ b/docs/internship_prep/hardware/hw_reference.md @@ -296,7 +296,7 @@ Let $B,B_H,B_L$ be defined a similar matter. Therefore, *Serial (multi-cycle) multiplier:* -``` +``` text P = 0 while B != 0: if B(0) == 1: diff --git a/docs/reference/git/git_advanced.md b/docs/reference/git/git_advanced.md index 8e64ebe..ee55a66 100644 --- a/docs/reference/git/git_advanced.md +++ b/docs/reference/git/git_advanced.md @@ -14,7 +14,7 @@ before force pushing it to the remote repository with `git push -f`. Assume the following history exists and the current branch is "topic": -``` +``` text A---B---C topic / D---E---F---G main @@ -22,14 +22,14 @@ Assume the following history exists and the current branch is "topic": From this point, the result of either of the following commands: -``` +``` sh git rebase main git rebase main topic ``` would be: -``` +``` text A'--B'--C' topic / D---E---F---G main @@ -37,7 +37,7 @@ would be: If the local main branch is outdated with the remote main branch, use -``` +``` sh git rebase origin/main ``` @@ -51,7 +51,7 @@ Running git rebase with the `-i` flag begins an interactive rebasing session. Instead of blindly moving all of the commits to the new base, interactive rebasing gives you the opportunity to alter individual commits in the process. This lets you clean up history by removing, splitting, and altering an existing series of commits. -``` +``` sh git rebase -i main ``` @@ -87,19 +87,19 @@ In case of conflict, git rebase will stop at the first problematic commit and le You can use git diff to locate the markers (<<<<<<) and make edits to resolve the conflict. For each file you edit, you need to tell Git that the conflict has been resolved, typically this would be done with -``` +``` sh git add ``` After resolving the conflict manually and updating the index with the desired resolution, you can continue the rebasing process with -``` +``` sh git rebase --continue ``` Alternatively, you can undo the git rebase with -``` +``` sh git rebase --abort ``` diff --git a/docs/reference/python.md b/docs/reference/python.md index 93eff0e..3da6689 100644 --- a/docs/reference/python.md +++ b/docs/reference/python.md @@ -79,13 +79,13 @@ Bundle all the packages and their versions to run an application so that they do 4. Create/update the `requirements.txt` file (to record the versions of packages used in the project) - ``` + ``` sh pip freeze > requirements.txt ``` 5. Exit the virtual environment - ``` + ``` sh deactivate ``` diff --git a/pyproject.toml b/pyproject.toml index a950404..4306e9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,32 +14,18 @@ package = false exclude-newer = "7 days" [tool.rumdl] -# Recognize Python Markdown and its extensions, such as admonitions, content tabs and snippets. +# Python Markdown, which nests lists, and the content of admonitions and tabs, by four spaces, and +# its extensions, such as admonitions, content tabs and snippets. flavor = "mkdocs" -# Code blocks without a language, such as shell commands. -disable = ["MD040"] +# No line length limit, as in Zensical's own docs. +disable = ["MD013"] # The issue template's bold prompts, and its blank lines to fill in. exclude = [".github/ISSUE_TEMPLATE"] -[tool.rumdl.MD004] -style = "dash" - -[tool.rumdl.MD007] -# Python Markdown nests lists, and content in admonitions and tabs, by four spaces. -indent = 4 -style = "fixed" - -[tool.rumdl.MD013] -line-length = 180 -# Table rows cannot wrap. -tables = false - [tool.rumdl.MD033] +# An image's caption. allowed-elements = ["figure", "figcaption"] -[tool.rumdl.MD035] -style = "---" - [tool.rumdl.MD076] # A list item's admonition or table needs a blank line before it, which leaves the list's other # items tight. From 4bbed35ebc551f5f0961d6f54e67606eff31353a Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:31:55 -0700 Subject: [PATCH 11/19] Fix a dead link, and brackets that read as a link InterviewBit's OOP interview questions page is gone, so the link goes to its last Internet Archive copy. Zensical Studio reported the bracketed "[nondeterministic]" as a missing link reference, so the brackets are escaped; the page shows them as before. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/internship_prep/software/sw_questions.md | 2 +- docs/internship_prep/software/sw_reference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/internship_prep/software/sw_questions.md b/docs/internship_prep/software/sw_questions.md index 9c0c5dc..5ca8528 100644 --- a/docs/internship_prep/software/sw_questions.md +++ b/docs/internship_prep/software/sw_questions.md @@ -33,7 +33,7 @@ Similar or even identical questions can be found on LeetCode. - Alphabetically sort a string - Check, set, clear, and toggle a bit - Polymorphism - - See [40+ OOPs Interview Questions and Answers](https://www.interviewbit.com/oops-interview-questions/) + - See [40+ OOPs Interview Questions and Answers](https://web.archive.org/web/20241201171115/https://www.interviewbit.com/oops-interview-questions/) - Python questions - Datatypes - List vs array diff --git a/docs/internship_prep/software/sw_reference.md b/docs/internship_prep/software/sw_reference.md index 038b672..2e2daf5 100644 --- a/docs/internship_prep/software/sw_reference.md +++ b/docs/internship_prep/software/sw_reference.md @@ -145,7 +145,7 @@ Definitions: - $P$: all decision problems that can be solved in polynomial time - $NP$: all decision problems for which the instances where the answer is "yes" have proofs that can be verified in - [nondeterministic] polynomial time + \[nondeterministic\] polynomial time - Has an efficient verifier, but **may not** have an efficient solver - NP-complete: all problems in $NP$ which can be reduced to any other $NP$ problem in polynomial time - Has an efficient verifier, but **does not** have an efficient solver From f2cf466d8dbc50e1ab88c710962cce7d0cdd71c7 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:32:33 -0700 Subject: [PATCH 12/19] Install lychee with uv, and check links with it in CI too lychee-bin, which lychee's maintainers publish on PyPI, is in its own dependency group, so only `make links` installs it, not `uv sync` or the other tasks: its Linux wheels are about 75 MB. The Links workflow runs `make links` instead of lychee-action, so CI checks with the same version, which Dependabot updates with the rest of uv.lock. It also runs on pull requests that change it or lychee.toml, so they're tested before merging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/links.yml | 22 +++++++++++++++++----- Makefile | 7 ++++--- README.md | 2 +- pyproject.toml | 3 +++ uv.lock | 26 ++++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 9 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index a9d59b5..b5bd5cd 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -1,16 +1,25 @@ name: Links # Other sites can change at any time, so lychee checks the links to them every week, and on demand. -# The site's own links are checked by every build. +# It also runs on pull requests that change how it checks them. The site's own links are checked by +# every build. on: schedule: # Every Saturday at 11:00 UTC - cron: "0 11 * * 6" workflow_dispatch: + pull_request: + paths: + - .github/workflows/links.yml + - lychee.toml permissions: contents: read +env: + # Fail instead of updating uv.lock, including in the uv runs that make starts. + UV_LOCKED: "1" + jobs: lychee: runs-on: ubuntu-26.04 @@ -19,7 +28,10 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - # Reads lychee.toml. GitHub's token raises its rate limit for github.com links. - - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 - with: - args: --no-progress docs includes README.md + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 + # uv installs the lychee that uv.lock pins, which reads lychee.toml. + - name: Check links + env: + # Raises lychee's rate limit for github.com links. + GITHUB_TOKEN: ${{ github.token }} + run: make links diff --git a/Makefile b/Makefile index 44b2636..0b9e9b1 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,10 @@ lint: ## Markdown, spelling and the GitHub workflows $(UV_RUN) actionlint $(UV_RUN) zizmor --quiet $(if $(filter undefined,$(origin GH_TOKEN)),--offline) .github -# The links workflow runs lychee weekly, as other sites can change at any time. -links: ## Check the links to other sites; needs lychee - lychee docs includes README.md +# lychee comes from the links dependency group, which only this task installs. The Links workflow +# runs it weekly, as other sites can change at any time. +links: ## Check the links to other sites + $(UV_RUN) --group links lychee docs includes README.md AGENTS.md clean: ## Remove the built site and the build caches rm -rf site .cache diff --git a/README.md b/README.md index 74ebefc..a7714bc 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ On Windows, run the tasks in WSL. | `make build` | Build the site into `site/`, as CI does; a broken link or anchor fails it | | `make lint` | Check the Markdown with rumdl, the spelling with typos, and the GitHub workflows with actionlint and zizmor | | `make format` | Fix what rumdl can in the Markdown | -| `make links` | Check the links to other sites with [lychee](https://lychee.cli.rs/), which needs installing separately | +| `make links` | Check the links to other sites with [lychee](https://lychee.cli.rs/), which uv installs the first time | | `make clean` | Remove the built site and the build caches | `make help` lists the tasks. zizmor runs its online audits when `GH_TOKEN` is set, diff --git a/pyproject.toml b/pyproject.toml index 4306e9a..5b1e3b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,3 +47,6 @@ dev = [ "typos>=1.52.2", "zizmor>=1.33.1", ] +links = [ + "lychee-bin>=0.24.2", +] diff --git a/uv.lock b/uv.lock index 21e6722..f12592e 100644 --- a/uv.lock +++ b/uv.lock @@ -33,6 +33,28 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, ] +[[package]] +name = "lychee-bin" +version = "0.24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/17/afdbe91346330bfac5347165b4aca4c48b5e4a480d3078693655603228e4/lychee_bin-0.24.2.tar.gz", hash = "sha256:6c0a7f93f3da675f806d12d70cc794035c6d72aedb8105d5d0e20687051d2188", size = 335242, upload-time = "2026-05-01T15:58:20.078Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/f2/501c01c6375d7bee83b76df3d4f6a5ded556ede778992a35ce97c6b861bc/lychee_bin-0.24.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:d97b0f082fcfa01330663697c0f857af7f070a1d4a4d8d24a39804cdb281797b", size = 8779477, upload-time = "2026-05-01T15:58:03.315Z" }, + { url = "https://files.pythonhosted.org/packages/c6/c2/157198f21c8f0dcb7e1ba1b87201e5ca51548c56d5f0c2cd9473b6dbb1d1/lychee_bin-0.24.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f471d5d9b27e800720bfe66b43dbee35d55a1f259ff7041ba0254f6bfe443868", size = 8596389, upload-time = "2026-05-01T15:58:01.3Z" }, + { url = "https://files.pythonhosted.org/packages/93/53/3fbf4f261ff638d4e6727c9ae5e8ad90cdcfaa918fc8cf6ad72419ffe59d/lychee_bin-0.24.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb8e17ea7e412a076ed237020906ae00ca9f14019bdbfd9f4390363cb8a1d3f9", size = 67446584, upload-time = "2026-05-01T15:57:42.776Z" }, + { url = "https://files.pythonhosted.org/packages/0c/93/1e5651b9a2a0d2121643e3f2b2f7c45674b9e9e8e3cbf0d9968ef3639d94/lychee_bin-0.24.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac9be8fb5b503323615fa9e955754bab9f557adda731048eef912c729368a22a", size = 74313987, upload-time = "2026-05-01T15:57:54.2Z" }, + { url = "https://files.pythonhosted.org/packages/9d/c4/873e20986851918a3016289a0a7f8c24f302a9b395db17effea9189579d3/lychee_bin-0.24.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f1bf83a6c9aed06b43e2f0d4ca1205be4db29772f3853397982eec815b14bea", size = 74677922, upload-time = "2026-05-01T15:57:46.859Z" }, + { url = "https://files.pythonhosted.org/packages/e4/3e/870682d41261a16371e2a99d725744b8f8c61fbfc852dd8b0b6a608bf5ef/lychee_bin-0.24.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:078c1961d3cb660d4963ecaac8cdf1b344fe0026740770e63756ecf1d01b695d", size = 76945853, upload-time = "2026-05-01T15:57:50.715Z" }, + { url = "https://files.pythonhosted.org/packages/c3/68/d5dc9c0029c2ebf72012d19a2698534e70032d2fe9cb76db84bd35e533a3/lychee_bin-0.24.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a7f41c25e25135a24c5ebfb49b8293c6513a0475d42ba860898754888c996f4", size = 78133548, upload-time = "2026-05-01T15:57:58.603Z" }, + { url = "https://files.pythonhosted.org/packages/e7/a0/457ae5d9ac956efae078af6db5a44f4d3d26884e7b6bb2c2d841d35a7f3b/lychee_bin-0.24.2-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:2310631ed71762504c3a9e3df7bc9590af6a792dd37614b2bafe7c24abc63193", size = 71870023, upload-time = "2026-05-01T15:57:39.291Z" }, + { url = "https://files.pythonhosted.org/packages/b2/51/329a7be61b4491c4ea374d98f9363ebd6c162084f5ebc2c9132c3bbf14fc/lychee_bin-0.24.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5837f0dc12314ecd5a9b9e2f036c549f05f353330d68bf5949510ccb8ed24179", size = 72190532, upload-time = "2026-05-01T15:58:06.048Z" }, + { url = "https://files.pythonhosted.org/packages/e3/4f/8f321caef03158c137121ca458e703902bd2236db27b9a1dd2aa5753c571/lychee_bin-0.24.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:aa2fe2e9fa48eacebe011870785ff2af8707ef4de2bfcdb2cba21e6391c14b41", size = 68169065, upload-time = "2026-05-01T15:58:10.223Z" }, + { url = "https://files.pythonhosted.org/packages/3c/29/c4b023a53b4fe59ab0e1e5d8459c63c5faf8a79c4d1dc739bfc528ab7786/lychee_bin-0.24.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:28d89190a91f5b172e09796128fbb6c672753c68ab3ac1684f2a414c3b5fab1d", size = 73198125, upload-time = "2026-05-01T15:58:13.6Z" }, + { url = "https://files.pythonhosted.org/packages/18/70/3a5a17ad4688409c13794efbf874caa2af63c9287868ce2439af7cad2c83/lychee_bin-0.24.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:16c67925e7d10d38c2ff79338b6ab406399eb557cf9248fddbdec9a0c30f5384", size = 74058233, upload-time = "2026-05-01T15:58:17.172Z" }, + { url = "https://files.pythonhosted.org/packages/80/86/354279c0f3fd9f5522e0aa6528dd465b4876570aee8d14ff361694ccf587/lychee_bin-0.24.2-py3-none-win32.whl", hash = "sha256:766a2a097f8f2eb497909fe4325a3184d88785f030dc0794fa3a3bb01808d07f", size = 6614778, upload-time = "2026-05-01T15:58:22.61Z" }, + { url = "https://files.pythonhosted.org/packages/de/9b/d0e3a896cfa1ae023d0a42ba61234284309d14897b050f63a94f61d0b8ed/lychee_bin-0.24.2-py3-none-win_amd64.whl", hash = "sha256:6ac1307ca588c0bfd57feaaec849b3af215b28921ec068ae7cf0b257caedae46", size = 7404639, upload-time = "2026-05-01T15:58:21.155Z" }, +] + [[package]] name = "markdown" version = "3.11.3" @@ -101,6 +123,9 @@ dev = [ { name = "typos" }, { name = "zizmor" }, ] +links = [ + { name = "lychee-bin" }, +] [package.metadata] requires-dist = [{ name = "zensical", specifier = ">=0.1.3" }] @@ -113,6 +138,7 @@ dev = [ { name = "typos", specifier = ">=1.52.2" }, { name = "zizmor", specifier = ">=1.33.1" }, ] +links = [{ name = "lychee-bin", specifier = ">=0.24.2" }] [[package]] name = "pathspec" From 88b79878e534f5c0a2973e949de740adf0001b78 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:34:28 -0700 Subject: [PATCH 13/19] Space out the link checker's requests to each site Checking every link at once, github.com answered some with 503s, and which ones changed from run to run. Two requests at a time to each site, half a second apart, removed them, and a check takes about 30 seconds. lychee now also checks the links to files, such as the README's, which the site's build never sees. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lychee.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lychee.toml b/lychee.toml index 6dae99c..56b208d 100644 --- a/lychee.toml +++ b/lychee.toml @@ -1,5 +1,5 @@ -# lychee checks the links to other sites; `zensical build` checks the site's own links and anchors. -scheme = ["https", "http"] +# lychee checks the links to other sites, and to files, such as the README's; `zensical build` also +# checks the site's own links, and their anchors. # Sites that refuse automated requests, answering with an error for pages that exist. exclude = [ @@ -9,6 +9,11 @@ exclude = [ "^https://stackoverflow\\.com/", ] +# github.com answers a burst of requests with 503s, so lychee sends each site at most two at a time, +# half a second apart. +host_concurrency = 2 +host_request_interval = "500ms" + # Reuse results for a day, when checking again locally. cache = true max_cache_age = "1d" From b763e4324b831f51b312e18bb1a015057584ad43 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:34:52 -0700 Subject: [PATCH 14/19] Load KaTeX's latest 0.x release, as Zensical's docs do Dependabot can't update the version in zensical.toml's URLs, so it was pinned and updated by hand. jsDelivr now serves the latest 0.x release, which updates itself, as in Zensical's own setup for KaTeX. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 7 ++----- zensical.toml | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a7714bc..3a4942b 100644 --- a/README.md +++ b/README.md @@ -75,11 +75,8 @@ Dependabot proposes weekly updates for the Python packages and the workflows' ac major Python updates come separately. Most compromised releases are found and pulled within days, so every update takes only releases at least a week old: Dependabot waits a week, and `exclude-newer` in `pyproject.toml` sets the limit for uv. -To update by hand: - -- **Python packages:** edit `pyproject.toml` if needed, then run `uv lock --upgrade`. -- **KaTeX:** change its version in the jsDelivr URLs in `zensical.toml`, to a - [release](https://github.com/KaTeX/KaTeX/releases) at least a week old. +To update the Python packages by hand, edit `pyproject.toml` if needed, then run `uv lock --upgrade`. +KaTeX, which typesets the math, is the latest 0.x release, which jsDelivr serves, so it updates itself. ## Conventions diff --git a/zensical.toml b/zensical.toml index cfeb09e..c0be7a1 100644 --- a/zensical.toml +++ b/zensical.toml @@ -64,14 +64,14 @@ nav = [ { "About Me" = "profile.md" }, ] -# KaTeX typesets the math. +# KaTeX typesets the math. As in Zensical's docs, it's the latest 0.x release, so it updates itself. extra_css = [ - "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.css", + "https://cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css", ] extra_javascript = [ "javascripts/katex.js", - "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.js", - "https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/contrib/auto-render.min.js", + "https://cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js", + "https://cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.min.js", ] [project.theme] From 686d84399d59c21e2ee5e9cbf5223ad757b8408e Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:35:12 -0700 Subject: [PATCH 15/19] Simplify the llms.txt sections, and drop old comments from the nav In llmstxt's patterns, `*` also matches the pages in nested folders, so each section needs only one, and llms.txt, llms-full.txt and the pages' Markdown are unchanged. The nav's comments, carried over from mkdocs.yml, were notes to myself that the site never shows; the Internship Preparation page already says that it's a supplementary resource. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- zensical.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/zensical.toml b/zensical.toml index c0be7a1..e38d8f7 100644 --- a/zensical.toml +++ b/zensical.toml @@ -33,12 +33,10 @@ nav = [ ] }, ] }, { "Internship Preparation" = [ - # Disclaimer: not a learning resource, but for brush up / review / knowledge check. "internship_prep/index.md", { "Applications" = "internship_prep/applications.md" }, { "Interview Preparation" = "internship_prep/interview_prep.md" }, { "Hardware Interviews" = [ - # Definitions list for each topic, use abbreviations. { "Reference" = "internship_prep/hardware/hw_reference.md" }, { "Questions" = "internship_prep/hardware/hw_questions.md" }, ] }, @@ -153,14 +151,15 @@ strict = false [project.plugins.glightbox] -# llms.txt and llms-full.txt for language models, and a page's "Copy as Markdown" button. +# llms.txt and llms-full.txt for language models, and the "Copy as Markdown" button, which only the +# pages in a section get. [project.plugins.llmstxt] full_output = "llms-full.txt" -# A section's pages. In these patterns, `**/` matches one or more folders, but not none. +# A section's pages. `*` also matches the pages in nested folders. sections."About" = ["index.md", "profile.md"] -sections."Setup" = ["setup/*.md", "setup/**/*.md"] -sections."Internship Preparation" = ["internship_prep/*.md", "internship_prep/**/*.md"] -sections."Reference" = ["reference/*.md", "reference/**/*.md"] +sections."Setup" = ["setup/*.md"] +sections."Internship Preparation" = ["internship_prep/*.md"] +sections."Reference" = ["reference/*.md"] [project.markdown_extensions] abbr = {} From 3853b0036a506b06e48e4c4f76b44be01daf4b1a Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:35:33 -0700 Subject: [PATCH 16/19] Trim the VS Code setup VS Code has no TOML support, and Zensical Studio only handles zensical.toml in the TOML mode that an extension provides. Tombi replaces Even Better TOML, which hasn't been released since 2024, and whose maintainers say none are coming. Red Hat's YAML extension only added checks for dependabot.yml and release.yml, and unwantedRecommendations only hid a recommendation without disabling the extension, so both go. The tasks only wrapped make. The README no longer describes Neovim, as there's nothing to set up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .vscode/extensions.json | 8 ++------ .vscode/tasks.json | 37 ------------------------------------- README.md | 20 +++----------------- 3 files changed, 5 insertions(+), 60 deletions(-) delete mode 100644 .vscode/tasks.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a6004db..5054c20 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,14 +2,10 @@ "recommendations": [ "editorconfig.editorconfig", "github.vscode-github-actions", - "redhat.vscode-yaml", "rvben.rumdl", - "tamasfe.even-better-toml", "tekumara.typos-vscode", + // TOML support, which VS Code lacks, and which Zensical Studio needs for zensical.toml. + "tombi-toml.tombi", "zensical.zensical-studio" - ], - "unwantedRecommendations": [ - // rumdl and Zensical Studio lint the Markdown, understanding Python Markdown's extensions. - "davidanson.vscode-markdownlint" ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index f3fd25f..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "Serve", - "detail": "Preview the site, with drafts, rebuilding it as pages change", - "type": "shell", - "command": "make serve", - "problemMatcher": [] - }, - { - "label": "Build", - "detail": "Build the site into site/, as CI does; a broken link fails it", - "type": "shell", - "command": "make build", - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - }, - { - "label": "Lint", - "detail": "Markdown, spelling and the GitHub workflows", - "type": "shell", - "command": "make lint", - "problemMatcher": [] - }, - { - "label": "Format", - "detail": "Fix what rumdl can in Markdown", - "type": "shell", - "command": "make format", - "problemMatcher": [] - } - ] -} diff --git a/README.md b/README.md index 3a4942b..d088763 100644 --- a/README.md +++ b/README.md @@ -51,23 +51,9 @@ for example, `GH_TOKEN=$(gh auth token) make lint`. ## Editors -### Neovim - -My [Neovim configuration](https://github.com/patrick-5546/dotfiles/tree/main/dot_config/nvim) lints and formats -the Markdown with rumdl, which reads the settings in `pyproject.toml`. -Run `make serve` in another terminal to preview the site. - -### VS Code - -Opening the repository recommends the extensions in `.vscode/extensions.json`: - -- [Zensical Studio](https://zensical.org/studio/) previews the pages, completes links, anchors, snippets, and icons, - and reports problems such as broken links as you write; `zensical-studio.toml` configures its linter. - It reads the icons from Zensical in `.venv/`, so run `uv sync` first. -- rumdl lints and formats the other Markdown files, such as this one. Zensical Studio handles the pages in `docs/`. -- typos checks the spelling. - -**Terminal > Run Task** runs the tasks, and **Build** is the default build task. +Opening the repository in VS Code recommends [Zensical Studio](https://zensical.org/studio/), with the other extensions +in `.vscode/extensions.json`. Studio previews the pages, completes links, anchors, snippets, and icons, +and lints and formats the pages as you write. It reads the icons from Zensical in `.venv/`, so run `uv sync` first. ## Updating Dependencies From 9f17bcef47a2f6524c8621ee4fff49970dcc69ee Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:36:14 -0700 Subject: [PATCH 17/19] Keep the Zensical page about Zensical The page also described the repository's tooling, its lint and link check workflows, and embedded pyproject.toml and the Makefile, none of which are about Zensical. They move to a short CI section in the README, which already covers the tooling. The page keeps the site's layout, settings, plugins and features, and how it's built and deployed, and its embedding demo now embeds zensical.toml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 14 +++++- docs/reference/git/git_contributing.md | 2 +- docs/reference/zensical.md | 67 ++++---------------------- 3 files changed, 22 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index d088763..4ffa418 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ My notes on various programming-related topics, published at . The site is built with [Zensical](https://zensical.org/), and its -[Zensical page](https://patrick-5546.github.io/notes/reference/zensical/) explains how, -from the repository's layout to CI and deployment. +[Zensical page](https://patrick-5546.github.io/notes/reference/zensical/) explains how it's set up and deployed. ## Setup @@ -55,6 +54,17 @@ Opening the repository in VS Code recommends [Zensical Studio](https://zensical. in `.vscode/extensions.json`. Studio previews the pages, completes links, anchors, snippets, and icons, and lints and formats the pages as you write. It reads the icons from Zensical in `.venv/`, so run `uv sync` first. +## CI + +- The [CI workflow](.github/workflows/ci.yml) runs `make lint` and `make build` on every push and pull request. +- The [Links workflow](.github/workflows/links.yml) runs `make links` every Saturday, on demand, + and on pull requests that change it or `lychee.toml`, which excludes the sites that refuse automated requests. +- The [Deploy workflow](.github/workflows/deploy.yml) publishes the site, as the + [Zensical page](https://patrick-5546.github.io/notes/reference/zensical/#building-and-deploying) explains. + +The workflows pin their actions to commit SHAs, give each job only the permissions it needs, +and don't keep Git credentials: practices that zizmor checks for. + ## Updating Dependencies Dependabot proposes weekly updates for the Python packages and the workflows' actions, in one pull request per ecosystem; diff --git a/docs/reference/git/git_contributing.md b/docs/reference/git/git_contributing.md index 1683bf3..493d75f 100644 --- a/docs/reference/git/git_contributing.md +++ b/docs/reference/git/git_contributing.md @@ -73,7 +73,7 @@ git remote prune origin - Actions: automate, customize, and execute software development workflows - [Actions documentation](https://docs.github.com/en/actions) - [GitHub Marketplace - Actions](https://github.com/marketplace?type=actions) - - [Explanation of this project's workflows](../zensical.md#ci-cd-using-github-actions) + - [Explanation of this project's workflows](https://github.com/patrick-5546/notes#ci) - [Encrypted secrets documentation](https://docs.github.com/en/actions/security-guides/encrypted-secrets) - Wiki: host very basic documentation, [GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) only diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index e43aaf5..e84ad5e 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -25,10 +25,10 @@ and it is where the team now develops new features, so I moved the site to it. | `docs/` | A Markdown file for every page, and the images and JavaScript they use | | `includes/abbreviations.md` | The glossary, which every page gets | | `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | -| `pyproject.toml`, `uv.lock` | Zensical and the linters, with their locked versions, and the linters' settings | | `zensical-studio.toml` | Zensical Studio's lint rules | -| `lychee.toml` | The settings for checking the links to other sites | -| `Makefile` | The tasks for previewing, building, and checking the site | + +The [README](https://github.com/patrick-5546/notes) explains how to install Zensical and run it, +and the repository's other tools. ### Page Tree Example @@ -75,8 +75,8 @@ View the [authoring guide](https://zensical.org/docs/authoring/markdown/) for wh Syntax highlighting for inline code: Python's `#!python range()` function... - ``` toml title="Embed of pyproject.toml" linenums="1" - --8<-- "pyproject.toml" + ``` toml title="Embed of zensical.toml" linenums="1" + --8<-- "zensical.toml" ``` ### Content tabs, icons, glossary @@ -130,69 +130,20 @@ graph LR ==Highlighted==, ^^inserted^^, and ~~deleted~~ text; H~2~O and 2^10^. See [diagrams](https://zensical.org/docs/authoring/diagrams/) and [formatting](https://zensical.org/docs/authoring/formatting/). -## Tooling - -[uv](https://docs.astral.sh/uv/) installs the Python version in `.python-version`, Zensical, and the linters, -with the versions locked in `uv.lock`. The Makefile runs each tool through `uv run`. -The [README](https://github.com/patrick-5546/notes) lists its tasks and the editor setup, -and explains how the dependencies are updated. - -- [rumdl](https://rumdl.dev/flavors/mkdocs/) lints and formats the Markdown. Its `mkdocs` flavor understands - Python Markdown's extensions, such as admonitions, content tabs, and snippets. -- [typos](https://github.com/crate-ci/typos) checks the spelling. -- [actionlint](https://github.com/rhysd/actionlint) checks the workflows for mistakes, - and [zizmor](https://docs.zizmor.sh/audits/) for security problems. -- Each build checks the site's own links and anchors, and [lychee](https://lychee.cli.rs/) checks the links to other sites. - -??? quote "Makefile for this project" - - ``` makefile title="Makefile" linenums="1" - --8<-- "Makefile" - ``` - -## CI / CD Using GitHub Actions - -### Lint and Build - -The CI workflow runs on every push and pull request to the main branch. -It lints the site and builds it, checking out the whole Git history for the pages' revision dates. -The build is the check for broken links and anchors, and missing snippets. -A ruleset only lets a pull request merge into the main branch once both jobs pass. - -??? quote "CI workflow for this project" - - ``` yaml title=".github/workflows/ci.yml" linenums="1" - --8<-- ".github/workflows/ci.yml" - ``` - -### Deploy +## Building and Deploying +Every push and pull request builds the site in strict mode, which fails on a broken link or anchor, +or a missing snippet. Each build checks out the whole Git history, which the pages' revision dates come from. The Deploy workflow builds the site again on every push to the main branch, and on demand, then deploys it to GitHub Pages. Only its deploy job can publish the site. -The actions are pinned to commit SHAs, each job only gets the permissions it needs, -and the checkouts don't keep Git credentials: practices that zizmor checks for. - ??? quote "Deploy workflow for this project" ``` yaml title=".github/workflows/deploy.yml" linenums="1" --8<-- ".github/workflows/deploy.yml" ``` -### Check Links - -Other sites can change at any time, so the Links workflow checks the links to them every Saturday, and on demand. -Sites that refuse automated requests are excluded in `lychee.toml`. - -??? quote "Links workflow for this project" - - ``` yaml title=".github/workflows/links.yml" linenums="1" - --8<-- ".github/workflows/links.yml" - ``` - -### Resources - -- [Schedule workflow runs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) +- [Publish your site](https://zensical.org/docs/publish-your-site/) with Zensical - [Publish to GitHub Pages with a custom workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) ## Example Sites From b8f9ba50bebde4461379b44db2e814b1a67ddf27 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:37:33 -0700 Subject: [PATCH 18/19] Format the pages with Zensical Studio Studio formats the pages as Zensical's own docs are formatted: - a list item's text starts at its nested content's four-space indent - an admonition's text follows a blank line - tables' columns line up - emphasis uses underscores rumdl expected one space after a list marker, so a page formatted in VS Code failed its check. Without that rule, rumdl accepts Studio's format, and its own formatter leaves it unchanged. The pages render the same, apart from whitespace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/index.md | 6 +- docs/internship_prep/applications.md | 39 +-- docs/internship_prep/hardware/hw_questions.md | 38 +-- docs/internship_prep/hardware/hw_reference.md | 237 +++++++++--------- docs/internship_prep/interview_prep.md | 48 ++-- docs/internship_prep/software/sw_questions.md | 40 +-- docs/internship_prep/software/sw_reference.md | 56 ++--- docs/reference/bookmarks.md | 10 +- docs/reference/git/git_advanced.md | 50 ++-- docs/reference/git/git_commands.md | 54 ++-- docs/reference/git/git_contributing.md | 39 +-- docs/reference/python.md | 32 +-- docs/reference/shortcuts.md | 111 ++++---- docs/reference/ssh.md | 10 +- docs/reference/unix.md | 82 +++--- docs/reference/wsl.md | 22 +- docs/reference/zensical.md | 24 +- docs/setup/ide.md | 28 +-- docs/setup/index.md | 11 +- docs/setup/terminals/windows-terminal.md | 14 +- pyproject.toml | 5 +- 21 files changed, 486 insertions(+), 470 deletions(-) diff --git a/docs/index.md b/docs/index.md index cff9c8b..64fad3f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,11 +14,11 @@ for a sneak peak, check out the [open issues](https://github.com/patrick-5546/no I created this website to: 1. Consolidate all my resources and references in one place. I just hate it when I recognize an error -message but forgot how I resolved it. Or when I revisit a tool and forgot how it works. -Thus, I plan to record what I learn here while it is fresh in my memory. + message but forgot how I resolved it. Or when I revisit a tool and forgot how it works. + Thus, I plan to record what I learn here while it is fresh in my memory. 2. Further my understanding of what I learn by writing it in my own words. This improves learning -retention and serves as a resource that I can use to refresh my memory. + retention and serves as a resource that I can use to refresh my memory. 3. Build skills related to software development, including Git, CI/CD, iterative development, and documentation. diff --git a/docs/internship_prep/applications.md b/docs/internship_prep/applications.md index bd51b70..69debb3 100644 --- a/docs/internship_prep/applications.md +++ b/docs/internship_prep/applications.md @@ -10,6 +10,7 @@ In economic terms, my strategy has a high upfront cost, but minimal recurring co ## Resume !!! quote "" + How your experiences and achievements make you the best candidate for the position ### Technical skills @@ -19,28 +20,29 @@ In economic terms, my strategy has a high upfront cost, but minimal recurring co ### Experiences -- 3-point structure +- 3-point structure 1. Overview/context/ of the experience 2. Result/achievement (ideally quantitative) 3. What you specifically did/learned -- [Recruiters don't look at a resume very long, and often read in an F-pattern](https://www.hrdive.com/news/eye-tracking-study-shows-recruiters-look-at-resumes-for-7-seconds/541582/) +- [Recruiters don't look at a resume very long, and often read in an F-pattern](https://www.hrdive.com/news/eye-tracking-study-shows-recruiters-look-at-resumes-for-7-seconds/541582/) - Clear sections and headers - Concise sentences - Phrase sentences so that keys words are at the beginning ### Length -- 1 page for US or larger companies, 2 pages for Canada or smaller companies -- Shorten resume by cutting experiences: consider relevance to the position and similarity to other experiences +- 1 page for US or larger companies, 2 pages for Canada or smaller companies +- Shorten resume by cutting experiences: consider relevance to the position and similarity to other experiences - Can put everything on LinkedIn and link to your profile in the resume - Can have multiple resumes for different types of jobs (e.g., software, firmware, hardware) -- Lengthen resume by padding experiences: consider mentioning transferable soft skills +- Lengthen resume by padding experiences: consider mentioning transferable soft skills - For example, Agile methodologies, proactive/self-motivated nature, leadership, communication, documentation -- If you don't have many relevant experiences, considering adding sections on work/volunteer experience and non-technical interests to differentiate yourself from other applicants +- If you don't have many relevant experiences, considering adding sections on work/volunteer experience and non-technical interests to differentiate yourself from other applicants ## Cover Letter !!! quote "" + Quick to write, yet high quality & personalized ### When to write cover letters @@ -59,20 +61,20 @@ to do so: ### Format -1. Introduction - - Passion for role - - Passion for company products/services/achievements/work culture - - Mention personal contacts and other interactions with the company you have had - - General statement about what makes you a good fit +1. Introduction + - Passion for role + - Passion for company products/services/achievements/work culture + - Mention personal contacts and other interactions with the company you have had + - General statement about what makes you a good fit - Include vocabulary from the job description -2. Body - - Describe relevant experience using the START technique +2. Body + - Describe relevant experience using the START technique - **S**ituation - scene and context - **T**ask - goal - **A**ction - what you specifically did - **R**esult - achievement (make quantitative if possible), what you learned - **T**ransfer - how what you learned can be used in the position you are applying for -3. Conclusion +3. Conclusion - Thank the hiring committee for their time - Include how they can arrange an interview @@ -95,12 +97,13 @@ and maybe in the terms used in the introduction paragraph general statement. ## Job Search !!! quote "" + Manage your time effectively ### Gather information -- Attend info sessions, workshops -- Reach out to people working at the company +- Attend info sessions, workshops +- Reach out to people working at the company - Managers, recruiters, staff, interns - Learn about the industry, company, and their personal experiences - Ask them about open positions and referrals @@ -110,8 +113,8 @@ and maybe in the terms used in the introduction paragraph general statement. I kept track of my applications using a table similar to the one below. I use it to analyze the results of previous applications to determine which positions I should apply to next. -For example, if I see that I did not have much success applying to positions with greater than *#* applicants, -or that require *xxxx* skills, I would avoid applying to similar types of jobs in the future, +For example, if I see that I did not have much success applying to positions with greater than _#_ applicants, +or that require _xxxx_ skills, I would avoid applying to similar types of jobs in the future, or revise my resume and cover letter to strengthen those areas. | Position | Company | Application Deadline | Resume/CL Template | Technical Requisites | # Applicants | % Confidence | Status | Notes | diff --git a/docs/internship_prep/hardware/hw_questions.md b/docs/internship_prep/hardware/hw_questions.md index 8a92d30..80feba9 100644 --- a/docs/internship_prep/hardware/hw_questions.md +++ b/docs/internship_prep/hardware/hw_questions.md @@ -14,26 +14,26 @@ The answers to some of these questions can be found in the [Hardware Reference]( ## Seeking my second internship -- Draw and compare the waveforms for a latch and DFF -- How to select between a Mealy and Moore FSM -- Implement a buffer and inverter from a NAND or XOR gate -- Implement DFFs (synchronous and asynchronous reset, enable) and latch in Verilog -- Different types of power dissipation -- Different types of adders -- Hardware multiplication and alternatives -- One hot vs binary FSM state encodings -- Causes of inferred latches -- Applications of latches -- Causes and fixes for setup and hold time violations -- Causes and fixes for clock domain crossings; metastability -- Gray code applications -- SystemVerilog vs Verilog +- Draw and compare the waveforms for a latch and DFF +- How to select between a Mealy and Moore FSM +- Implement a buffer and inverter from a NAND or XOR gate +- Implement DFFs (synchronous and asynchronous reset, enable) and latch in Verilog +- Different types of power dissipation +- Different types of adders +- Hardware multiplication and alternatives +- One hot vs binary FSM state encodings +- Causes of inferred latches +- Applications of latches +- Causes and fixes for setup and hold time violations +- Causes and fixes for clock domain crossings; metastability +- Gray code applications +- SystemVerilog vs Verilog - Purpose of for loops in SystemVerilog -- Transistors -- RC circuits -- Clock jitter, skew -- Setup and hold slack -- Draw a state machine diagram of an elevator (more details about the elevator's functionality were given) +- Transistors +- RC circuits +- Clock jitter, skew +- Setup and hold slack +- Draw a state machine diagram of an elevator (more details about the elevator's functionality were given) ## Resources diff --git a/docs/internship_prep/hardware/hw_reference.md b/docs/internship_prep/hardware/hw_reference.md index 0684a06..d5978dc 100644 --- a/docs/internship_prep/hardware/hw_reference.md +++ b/docs/internship_prep/hardware/hw_reference.md @@ -2,32 +2,35 @@ ## ASIC vs FPGA vs Processor -| | ASIC | FPGA | Processor | -| -------- | ---- | ---- | --------- | -| Performance | High | Medium | Low | -| Power Consumption | Low | Medium | High | -| Flexibility | None | Somewhat | General purpose | -| Design Process | Difficult, long | Medium | Easy, quick (software) | -| Cost | Cheaper for large volumes | Cheaper for small volumes | Cheapest (mass-produced) | +| | ASIC | FPGA | Processor | +| ----------------- | ------------------------- | ------------------------- | ------------------------ | +| Performance | High | Medium | Low | +| Power Consumption | Low | Medium | High | +| Flexibility | None | Somewhat | General purpose | +| Design Process | Difficult, long | Medium | Easy, quick (software) | +| Cost | Cheaper for large volumes | Cheaper for small volumes | Cheapest (mass-produced) | ## FPGA Design Process
- ![FPGA Pictures](../../assets/fpga_pics.png) -
(Left) FPGA Design Process; (Right) 3-Input LUT
+ +![FPGA Pictures](../../assets/fpga_pics.png) + +
(Left) FPGA Design Process; (Right) 3-Input LUT
+
-1. **Synthesis:** break logic into LUTs +1. **Synthesis:** break logic into LUTs - A $n$-input LUT can make any $n$-input function, combinational or sequential -2. **Mapping/placing:** place LUTs into CLBs such that +2. **Mapping/placing:** place LUTs into CLBs such that - Connected LUTs are close to each other - Critical path is approximately minimized -3. **Routing:** connecting logic blocks together - - Uses programmable switches: NMOS acts as conductor when the configuration bit (part of bitstream) is 1, connecting the tracks - - Connects CLBs with segments of varying lengths +3. **Routing:** connecting logic blocks together + - Uses programmable switches: NMOS acts as conductor when the configuration bit (part of bitstream) is 1, connecting the tracks + - Connects CLBs with segments of varying lengths - Shorter segments minimize delay, noise, and crosstalk - Longer segments have extra capacitance and limited quantity, but minimize the number of segments needed -4. **Timing analysis:** looks for timing violations +4. **Timing analysis:** looks for timing violations - Path delay is sum of all logic and wire delays ## Memory @@ -36,23 +39,23 @@ ## Caches -- Offer temporal (recently accessed in cache), and spatial (multi-word blocks) locality - - Instructions tend to be more spatial, data could be both - - To better support temporal: decrease block size and number of sets, or increase associativity +- Offer temporal (recently accessed in cache), and spatial (multi-word blocks) locality + - Instructions tend to be more spatial, data could be both + - To better support temporal: decrease block size and number of sets, or increase associativity - Block size: number of bytes per cache line - Associativity: number of cache lines per set - - Memory mountains + - Memory mountains - Temporal: levels, based on which level of cache can fully contain the working set - Spatial: throughput decreases with increasing stride length until stride length ≥ block size -- Amdahl's law: speedup = $\frac{1}{(1-a) + \frac{a}{k}}$, where $a$ is the percentage of code sped up by $k$ times +- Amdahl's law: speedup = $\frac{1}{(1-a) + \frac{a}{k}}$, where $a$ is the percentage of code sped up by $k$ times - Increasing associativity decreases conflict misses, but decreases performance (specifically lookup and replacement times) -- Write through is good for synchronization, write back is faster when modifying same cache line multiple times +- Write through is good for synchronization, write back is faster when modifying same cache line multiple times ## Power Dissipation ### Types of Power Dissipation -*Dynamic:* every time a node is switched from 0 to 1 or 1 to 0, some power is dissipated +_Dynamic:_ every time a node is switched from 0 to 1 or 1 to 0, some power is dissipated $$ P_{dynamic} = \alpha fCV^2 @@ -63,7 +66,7 @@ $$ - $C$ is the capacitance - $V$ is the voltage -*Static:* every transistor on the chip leaks, even when it is not doing anything +_Static:_ every transistor on the chip leaks, even when it is not doing anything ### Power Dissipation vs Transistor Size @@ -74,28 +77,28 @@ As digital circuits shrink (and chip voltages decrease): ### Reducing Power Dissipation -- Custom chip +- Custom chip - Turn off regions that are unused to reduce static power (dark silicon) - Multiple threshold libraries -- FPGA +- FPGA - Minimize area (less leakage, may allow for smaller FPGA) -- General - - Lower voltage - - Revise implementation (add instead of multiply, invert bus) - - Pipelining: adding flip flops prevents glitches from propagating, which reduces glitch power +- General + - Lower voltage + - Revise implementation (add instead of multiply, invert bus) + - Pipelining: adding flip flops prevents glitches from propagating, which reduces glitch power - Disadvantage: flip flops use power, which places extra burden on the clock tree ## Timing ### Gate Delay -- Every wire and transistor has parasitic capacitance (physical property) -- Delay of logic gate is the time it takes to charge the capacitance on its output, -which is the net capacitance of the parasitic capacitances of the wires and transistors - - Proportional to $RC$ ($nRC$ for $n$ gates, where $n$ is the number of gates in the path) - - $R$ depends on size of logic gate transistor (bigger → lower $R$) and length of wire (longer → higher $R$) - - $C$ depends on the same things in the same ways as $R$, but also depends on fanout (larger fanout → higher $C$) - - Fanout: number of inputs driven by an output +- Every wire and transistor has parasitic capacitance (physical property) +- Delay of logic gate is the time it takes to charge the capacitance on its output, + which is the net capacitance of the parasitic capacitances of the wires and transistors + - Proportional to $RC$ ($nRC$ for $n$ gates, where $n$ is the number of gates in the path) + - $R$ depends on size of logic gate transistor (bigger → lower $R$) and length of wire (longer → higher $R$) + - $C$ depends on the same things in the same ways as $R$, but also depends on fanout (larger fanout → higher $C$) + - Fanout: number of inputs driven by an output - Reduce fanout by splitting net, but this increases the number of gates ### Modelling Delays @@ -108,8 +111,8 @@ $$ T_{\text{clk}} \geq T_{\text{clk2qMax}} + T_{\text{combinationalMax}} + T_{\text{setup}} $$ -- Setup violation causes metastability - - Fix by slowing down clock or moving registers around to reduce length of critical path +- Setup violation causes metastability + - Fix by slowing down clock or moving registers around to reduce length of critical path - For example, pipelining, which is best when critical path is much longer than other paths) #### Hold Time @@ -120,19 +123,19 @@ $$ T_{\text{clk2qMin}} + T_{\text{combinationalMin}} \geq T_{\text{hold}} $$ -- Hold time violation causes data loss - - Could be caused by clock skew - - Fix by increasing gate/DFF delays or adding buffers to data path or earlier clock paths +- Hold time violation causes data loss + - Could be caused by clock skew + - Fix by increasing gate/DFF delays or adding buffers to data path or earlier clock paths - Cannot be fixed by increasing clock period ### Glitches -- Glitch: undesired short-lived pulse that occurs before a signal settles to its intended value -- Caused by unequal arrival times of inputs on combinational gates + same output is generated by different values of state bits - - Ex 1: XORing the bits 01 → 0, transitioning to 11 or 00 → 1, before settling at 10 - - Ex 2: clock gating incorrectly such that the output of the AND gate (enable) glitches +- Glitch: undesired short-lived pulse that occurs before a signal settles to its intended value +- Caused by unequal arrival times of inputs on combinational gates + same output is generated by different values of state bits + - Ex 1: XORing the bits 01 → 0, transitioning to 11 or 00 → 1, before settling at 10 + - Ex 2: clock gating incorrectly such that the output of the AND gate (enable) glitches - Clock gating is used to reduce dynamic power - - Any transition consumes power, so unnecessary transitions consume unnecessary power + - Any transition consumes power, so unnecessary transitions consume unnecessary power #### Glitches in FSMs @@ -144,22 +147,22 @@ Effects Avoiding glitches -- Try to make it so that only 1 input bit changes at a time -- Register next outputs +- Try to make it so that only 1 input bit changes at a time +- Register next outputs - Quick fix, but adds one cycle delay, does not support direct dependence of outputs on inputs, requires extra registers -- Eliminate combinational logic after state machine +- Eliminate combinational logic after state machine - Move before current state machine or next state machine -- Require outputs to either be: - - Driven from a state bit or its complement - - Driven by (simple) combinatorial logic that depends on a single state bit +- Require outputs to either be: + - Driven from a state bit or its complement + - Driven by (simple) combinatorial logic that depends on a single state bit - Safest for signals that are constant for the duration of the state machine's operation ### Clock Domain Crossings -- Clock domain: all DFFs in each clock domain run on the same clock -- Signals that cross clock domains will likely cause timing violations -- Asynchronous signals also cause timing violations in a similar manner -- On a timing violation, output may get the right value, wrong value, or become metastable (value between 0 and 1 that resolves randomly) +- Clock domain: all DFFs in each clock domain run on the same clock +- Signals that cross clock domains will likely cause timing violations +- Asynchronous signals also cause timing violations in a similar manner +- On a timing violation, output may get the right value, wrong value, or become metastable (value between 0 and 1 that resolves randomly) - May cause system-wide failure #### Metastability @@ -180,12 +183,12 @@ $$ Time when it actually happens vs when it must happen (positive slack is when it happens before must). -- Setup: $T_{\text{required}} - T_{\text{arrival}}$ -- Hold: $T_{\text{arrival}} - T_{\text{required}}$ -- $T_{\text{required}}$: clock path +- Setup: $T_{\text{required}} - T_{\text{arrival}}$ +- Hold: $T_{\text{arrival}} - T_{\text{required}}$ +- $T_{\text{required}}$: clock path - Reg2reg and input2reg: $T_{clk} + T_{setup}$ - Reg2output: unconstrained -- $T_{\text{arrival}}$: data path +- $T_{\text{arrival}}$: data path - Reg2reg and reg2output: $T_{clk2q} + T_{combinational}$ - Input to reg: $T_{combinational}$ @@ -193,16 +196,16 @@ Reference: [Setup and hold slack](https://asic-soc.blogspot.com/2013/08/setup-an ### Practical Issues -- Retiming in pipelining: move combinational logic from one side of DFF to another to balance the critical path length of each stage -- Clock skew: clock edge arrives at different components at different times (might be due to the difference in path lengths) - - Implications +- Retiming in pipelining: move combinational logic from one side of DFF to another to balance the critical path length of each stage +- Clock skew: clock edge arrives at different components at different times (might be due to the difference in path lengths) + - Implications - change in $F_{max}$: changes setup time - Failure of design: hold time violations and functional problems losing current value because second clock arrives too late - - Fix using + - Fix using - Buffers - H-tree network (route so that same distance to each flop) - Global clocks that have dedicated routing to minimize clock skew; however, limited availability -- PLLs: mixed signal circuit that generates output clocks aligned to an input clock +- PLLs: mixed signal circuit that generates output clocks aligned to an input clock - Motivation: usually there is clock skew between the input and output clocks of a clock divider/multiplier, and routing a generated clock is unpredictable - Can even generate output clocks with the same phase as input clock @@ -212,52 +215,52 @@ Reference: [Setup and hold slack](https://asic-soc.blogspot.com/2013/08/setup-an #### 1-bit adders -- *Half adder:* two 1-bit inputs, 2-bit output -- *Full adder:* half adder + carry in and out +- _Half adder:_ two 1-bit inputs, 2-bit output +- _Full adder:_ half adder + carry in and out #### Multi-bit adders There are several types of carry propagate adders: -*Ripple-carry (slow):* chain of full adders that bitwise add N-bit inputs +_Ripple-carry (slow):_ chain of full adders that bitwise add N-bit inputs -- Delay: $t_{ripple} \approx Nt_{FA}$, where $t_{FA}$ is the delay of a full adder +- Delay: $t_{ripple} \approx Nt_{FA}$, where $t_{FA}$ is the delay of a full adder - Proportional to N -- FPGAs are optimized for ripple carry adders, so faster than other implementations when $N ≤ 16$ +- FPGAs are optimized for ripple carry adders, so faster than other implementations when $N ≤ 16$ -*Carry select (less slow):* calculate higher-order bits for both cases of carry-in, then select correct case when carry in is available +_Carry select (less slow):_ calculate higher-order bits for both cases of carry-in, then select correct case when carry in is available - Requires more hardware, but slightly faster than ripple-carry adders -*Carry-lookahead (fast):* compute carry out for $k$-bit blocks using generate and propagate signals +_Carry-lookahead (fast):_ compute carry out for $k$-bit blocks using generate and propagate signals -- $G_i = A_iB_i$ +- $G_i = A_iB_i$ - $G_{3:0} = G_3+P_3(G_2+P_2(G_1+P_1G_0))$ -- $P_i = A_i+B_i$ +- $P_i = A_i+B_i$ - $P_{3:0} = P_3P_2P_1P_0$ -- $C_{out} = G_{in} + P_{in}C_{in}$ -- Delay of 4-bit adder: $4 t_{PD}$, where $t_{PD}$ is the delay of a single AND/OR gate +- $C_{out} = G_{in} + P_{in}C_{in}$ +- Delay of 4-bit adder: $4 t_{PD}$, where $t_{PD}$ is the delay of a single AND/OR gate - All $G,P$ terms available in $t_{PD}$ - $C$ terms (sum of products) available in $2t_{PD}$ - Results from full adder (sum, no carry out) available in $t_{PD}$ -- Not very scalable, so typical to make a N-bit CLA out of smaller $k$-bit CLAs - - Delay: $t_{CLA} = t_{pg} + t_{pg\_block} + \frac{N}{k-1}t_{AND\_OR} + kt_{FA}$ - - $t_{pg}$: delay to generate all $G_i,P_i$ - - $t_{pg\_block}$: delay to generate all $G_{i:j},P_{i:j}$ for every $k$-bit CLA - - $t_{AND\_OR}$: delay from $C_{in}$ to $C_{out}$ of the final AND/OR gate in a $k$-bit CLA - - $t_{CLA} = 4\log_4(N)t_{PD}$ +- Not very scalable, so typical to make a N-bit CLA out of smaller $k$-bit CLAs + - Delay: $t_{CLA} = t_{pg} + t_{pg\_block} + \frac{N}{k-1}t_{AND\_OR} + kt_{FA}$ + - $t_{pg}$: delay to generate all $G_i,P_i$ + - $t_{pg\_block}$: delay to generate all $G_{i:j},P_{i:j}$ for every $k$-bit CLA + - $t_{AND\_OR}$: delay from $C_{in}$ to $C_{out}$ of the final AND/OR gate in a $k$-bit CLA + - $t_{CLA} = 4\log_4(N)t_{PD}$ - Proportional to $\log N$ ![Untitled](../../assets/large_cla.png) ### Miscellaneous Arithmetic Circuits -- *Subtractor:* take two's complement of second input -- *Equality comparator:* bitwise XNOR -- *Less than comparator:* subtractor; last (sign) bit is 1 when A < B -- *Shift less than:* all 0's, except LSB is result of less than comparator (A < B) -- *Shifters:* arithmetic shifters (`<<<` `>>>`) are the same as logical shifters (`<<` `>>`) except the right arithmetic shift is sign extended -- *Division:* most complex, always use multi-cycle dividers in practice +- _Subtractor:_ take two's complement of second input +- _Equality comparator:_ bitwise XNOR +- _Less than comparator:_ subtractor; last (sign) bit is 1 when A < B +- _Shift less than:_ all 0's, except LSB is result of less than comparator (A < B) +- _Shifters:_ arithmetic shifters (`<<<` `>>>`) are the same as logical shifters (`<<` `>>`) except the right arithmetic shift is sign extended +- _Division:_ most complex, always use multi-cycle dividers in practice ### Multipliers @@ -266,14 +269,14 @@ Multiplication is a complex operation: avoid if possible - Add instead of multiply: $7 \times 2 \rightarrow 7 + 7$ - Shift instead of multiply for powers of 2: $7 \times 2 \rightarrow 7 << 2$ -*1-bit x N-bit:* AND operation +_1-bit x N-bit:_ AND operation -*N-bit x N-bit:* sum of shifted 1-bit x N-bit for each bit in the second term (long multiplication method) +_N-bit x N-bit:_ sum of shifted 1-bit x N-bit for each bit in the second term (long multiplication method) -*Large multiplier:* constructed out of smaller N-bit x N-bit multipliers +_Large multiplier:_ constructed out of smaller N-bit x N-bit multipliers -- Let $A$ be a $2N$-bit number, with $A_H$ being the upper N bits and $A_L$ being the lower N bits. -Let $B,B_H,B_L$ be defined a similar matter. Therefore, +- Let $A$ be a $2N$-bit number, with $A_H$ being the upper N bits and $A_L$ being the lower N bits. + Let $B,B_H,B_L$ be defined a similar matter. Therefore, $$ \begin{gathered} @@ -284,7 +287,7 @@ Let $B,B_H,B_L$ be defined a similar matter. Therefore, - $2^N$ shifts left by N bits -- The product of $A$ and $B$ is +- The product of $A$ and $B$ is $$ A \times B = A_HB_H2^{2N} + (A_HB_L+A_LB_H)2^N + A_LB_L @@ -292,9 +295,9 @@ Let $B,B_H,B_L$ be defined a similar matter. Therefore, - $2N$-bit x $2N$-bit produces a $4N$-bit result -*Signed multipliers* subtract last number (two's complement) rather than add it +_Signed multipliers_ subtract last number (two's complement) rather than add it -*Serial (multi-cycle) multiplier:* +_Serial (multi-cycle) multiplier:_ ``` text P = 0 @@ -315,8 +318,8 @@ $$ 101.01 = 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 + 0 \times 2^{-1} + 1 \times 2^{-2} = 5.25 $$ -- N-bit representation has $M$ integer bits (left of decimal point) and $N-M$ fraction bits (right of decimal point) -- Arithmetic operations: align decimal then perform as usual +- N-bit representation has $M$ integer bits (left of decimal point) and $N-M$ fraction bits (right of decimal point) +- Arithmetic operations: align decimal then perform as usual - Multiplication and division result in loss of precision ### Floating Point @@ -329,43 +332,43 @@ $$ The floating point representation saves the sign, biased exponent, and mantissa fields of the number in binary scientific notation -- IEEE 754 single-precision (32-bits): 1 sign bit, 8 biased exponent bits, 23 mantissa bits -- IEEE 754 double-precision (64-bits): 1 sign bit, 11 biased exponent bits, 52 mantissa bits -- Bias exponent to be positive to circumvent the need for a signed exponent field +- IEEE 754 single-precision (32-bits): 1 sign bit, 8 biased exponent bits, 23 mantissa bits +- IEEE 754 double-precision (64-bits): 1 sign bit, 11 biased exponent bits, 52 mantissa bits +- Bias exponent to be positive to circumvent the need for a signed exponent field - Bias is 127 for single-precision and 1023 for double-precision -- Range +- Range - Largest positive: exponent is all 1s except LSB, mantissa is all 1s - Smallest positive: exponent is all 0s except LSB, mantissa is all 0s -- Special cases - - Subnormal (smaller than what is normally possible): exponent all 0s, mantissa is interpreted as being preceded by 0 +- Special cases + - Subnormal (smaller than what is normally possible): exponent all 0s, mantissa is interpreted as being preceded by 0 - Smallest positive: mantissa is all 0's except the LSB - | Number | Sign | Biased Exponent | Mantissa | - | ------ | ---- | --------------- | -------- | - | 0 | X | 00000000 | 00000000000000000000000 | - | $\infty$ | 0 | 11111111 | 00000000000000000000000 | - | $-\infty$ | 1 | 11111111 | 00000000000000000000000 | - | NaN | X | 11111111 | non-zero | + | Number | Sign | Biased Exponent | Mantissa | + | --------- | ---- | --------------- | ----------------------- | + | 0 | X | 00000000 | 00000000000000000000000 | + | $\infty$ | 0 | 11111111 | 00000000000000000000000 | + | $-\infty$ | 1 | 11111111 | 00000000000000000000000 | + | NaN | X | 11111111 | non-zero | Example: write $-58.25_{10}$ in 32-bit floating point -1. Convert decimal to binary: $58.25_{10} = 111010.01_2$ -2. Write in binary scientific notation: $1.1101001 \times 2^5$ -3. Fill in the fields +1. Convert decimal to binary: $58.25_{10} = 111010.01_2$ +2. Write in binary scientific notation: $1.1101001 \times 2^5$ +3. Fill in the fields - Sign bit: $1$ (negative) - Biased exponent: $127 + 5 = 132 = 10000100_2$ - Mantissa: $110 1001 0000 0000 0000 0000_2$ ### Fixed vs Floating Point -- Fixed: simpler circuitry, smaller, less power consumption, cheaper -- Floating point: higher dynamic range of representable values +- Fixed: simpler circuitry, smaller, less power consumption, cheaper +- Floating point: higher dynamic range of representable values - Not synthesizable unless explicitly accounted for; useful for simulation ## SystemVerilog -- Types of modules +- Types of modules - Behavioral: describe what module does (gate level) - Structural: describe how it is built from simpler modules (instantiates other modules) -- Unlike regular Verilog, SystemVerilog supports OOP and generate statements +- Unlike regular Verilog, SystemVerilog supports OOP and generate statements - Generate statements are for readability; they don’t change hardware implementation diff --git a/docs/internship_prep/interview_prep.md b/docs/internship_prep/interview_prep.md index 1302580..9434044 100644 --- a/docs/internship_prep/interview_prep.md +++ b/docs/internship_prep/interview_prep.md @@ -1,6 +1,7 @@ # General Interview Preparation !!! quote "" + Prepare as much beforehand, as the time between being selected and the interview date could be less than a week ## Before being selected @@ -13,25 +14,26 @@ This is helpful when explaining technical details during an interview Next, prepare for common interview questions related to your experiences: -- **Describe a time when you had a conflict when working on a team, and how you resolved it** +- **Describe a time when you had a conflict when working on a team, and how you resolved it** - I have been asked this many, many times -- Tell me about yourself +- Tell me about yourself - Come up with a couple responses for different types of jobs -- Describe a problem that you solved -- Describe your process for debugging code -- Describe a leadership experience +- Describe a problem that you solved +- Describe your process for debugging code +- Describe a leadership experience Good topics to practice talking about include: -- Collaborating with colleagues to find the best possible solution +- Collaborating with colleagues to find the best possible solution - Receptive to feedback and varying perspectives - Each person has different strengths -- Bottom up approach - reusability, test each small part -- Besides performance, consider reliability, sustainable, and reparability +- Bottom up approach - reusability, test each small part +- Besides performance, consider reliability, sustainable, and reparability ### Prepare for open-ended technical questions !!! quote "" + It is more important to be able to clearly explain your ongoing thought process than to solve the problem [Video on technical interview preparation by Microsoft](https://www.youtube.com/watch?v=8Myx-vy0csM) @@ -52,12 +54,12 @@ Task Action -- Demonstrate logical thinking +- Demonstrate logical thinking - Give initial thoughts, broad overview - Subdivide into different parts -- Devise initial solution -- Walkthrough with a simple example to verify correctness -- Think about potential optimizations +- Devise initial solution +- Walkthrough with a simple example to verify correctness +- Think about potential optimizations Results @@ -66,13 +68,13 @@ Results ### Gain interview experience -- Any interview practice is good practice +- Any interview practice is good practice - Apply to as many positions as possible - Talk with professors about research opportunities - Make an appointment with your co-op advisor - Ask a friend -- Explain technical experiences so that even people not in the industry can follow -- Practice on-the-spot thinking; connect your answers with relevant experiences +- Explain technical experiences so that even people not in the industry can follow +- Practice on-the-spot thinking; connect your answers with relevant experiences ## After being selected @@ -82,9 +84,9 @@ Be able to explain them in your own words and relate to your past experiences. ### Prepare for position-specific questions -- Why do you want to work for the company/team/position? +- Why do you want to work for the company/team/position? - Research reputation, work culture, products/services, etc. -- Prepare questions for your interviewer intended to +- Prepare questions for your interviewer intended to - Help decide if the position is right for you - Demonstrate your enthusiasm and passion for the company/position and its products @@ -92,12 +94,12 @@ Be able to explain them in your own words and relate to your past experiences. Places where you can find past/common interview questions include: -- Past or current employees and interns -- Glassdoor -- Reddit -- LeetCode -- Cracking the Coding Interview -- My hardware and software Reference and Questions pages briefly go over the content covered and questions asked in my past interviews +- Past or current employees and interns +- Glassdoor +- Reddit +- LeetCode +- Cracking the Coding Interview +- My hardware and software Reference and Questions pages briefly go over the content covered and questions asked in my past interviews - They are intended as a way to review and gauge your knowledge rather than to learn new topics ## After the interview diff --git a/docs/internship_prep/software/sw_questions.md b/docs/internship_prep/software/sw_questions.md index 5ca8528..214704b 100644 --- a/docs/internship_prep/software/sw_questions.md +++ b/docs/internship_prep/software/sw_questions.md @@ -6,37 +6,37 @@ I have listed some software technical questions that were asked in my interviews Similar or even identical questions can be found on LeetCode. -- Parse string into dictionary -- Move all elements of a certain value in a list to the end -- Ping pong (simple multithreading) -- OOP (inheritance) -- Find the maximum MaximaCount out of all the categories in `categories` +- Parse string into dictionary +- Move all elements of a certain value in a list to the end +- Ping pong (simple multithreading) +- OOP (inheritance) +- Find the maximum MaximaCount out of all the categories in `categories` - `categories` is a string - The MaximaCount of character `c` representing a category in `categories` is the number indices `i` such that the frequency of `c` is maximum in the prefix of the string up to the index `i` -- Check similar passwords - - `newPasswords` and `oldPasswords` are lists of strings - - Return a list where the `i`th element is `"YES"` if `newPasswords[i]` and `oldPasswords[i]` are similar, else `"NO"` - - Passwords are similar if there exists a set of characters in the new password that can be incremented by 1 - (e.g., `"z"` -> `"a`", `"a"` -> `"b"`) to make the old password a subsequence +- Check similar passwords + - `newPasswords` and `oldPasswords` are lists of strings + - Return a list where the `i`th element is `"YES"` if `newPasswords[i]` and `oldPasswords[i]` are similar, else `"NO"` + - Passwords are similar if there exists a set of characters in the new password that can be incremented by 1 + (e.g., `"z"` -> `"a`", `"a"` -> `"b"`) to make the old password a subsequence - Subsequence: a sequence that can be derived from the given sequence by deleting 0 or more elements without changing the order of the remaining elements -- Remove ancestors of a tree starting from the leaf nodes, removing newly created leaf nodes first -- Remove ancestors of a tree starting from the leaf nodes, removing newly created leaf nodes last -- [Stock price fluctuation](https://leetcode.com/problems/stock-price-fluctuation/) -- Given an equation as a string, calculate the final result +- Remove ancestors of a tree starting from the leaf nodes, removing newly created leaf nodes first +- Remove ancestors of a tree starting from the leaf nodes, removing newly created leaf nodes last +- [Stock price fluctuation](https://leetcode.com/problems/stock-price-fluctuation/) +- Given an equation as a string, calculate the final result - E.g., `"add(5,mul(2,pow(5,2)))"` -> `55.0` ## Questions from hardware & embedded interviews -- Multiply numbers up to 100 digits long -- Alphabetically sort a string -- Check, set, clear, and toggle a bit -- Polymorphism +- Multiply numbers up to 100 digits long +- Alphabetically sort a string +- Check, set, clear, and toggle a bit +- Polymorphism - See [40+ OOPs Interview Questions and Answers](https://web.archive.org/web/20241201171115/https://www.interviewbit.com/oops-interview-questions/) -- Python questions +- Python questions - Datatypes - List vs array - Performance advantage of Numpy -- C/C++ questions +- C/C++ questions - See [Top Embedded C Interview Questions](https://web.archive.org/web/20260612021224/https://www.interviewbit.com/embedded-c-interview-questions/) diff --git a/docs/internship_prep/software/sw_reference.md b/docs/internship_prep/software/sw_reference.md index 2e2daf5..23b9a5d 100644 --- a/docs/internship_prep/software/sw_reference.md +++ b/docs/internship_prep/software/sw_reference.md @@ -10,15 +10,15 @@ Which resources I use to study DSA and how I use them. Learn/review: -- The [Tech Interview Handbook](https://www.techinterviewhandbook.org/) is one of the best resources for preparing for SWE interviews - - Learn/review topics following the [Algorithms Cheatsheet](https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/) +- The [Tech Interview Handbook](https://www.techinterviewhandbook.org/) is one of the best resources for preparing for SWE interviews + - Learn/review topics following the [Algorithms Cheatsheet](https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/) - Lists topics in priority order - For each topic, provides a short summary, explains related implementation techniques, gives related LeetCode problems, and much more - - Customize a LeetCode study plan according to your needs using [Grind 75](https://www.techinterviewhandbook.org/grind75) -- [Programiz DSA tutorials](https://www.programiz.com/dsa) is a more comprehensive resource on DSA topics + - Customize a LeetCode study plan according to your needs using [Grind 75](https://www.techinterviewhandbook.org/grind75) +- [Programiz DSA tutorials](https://www.programiz.com/dsa) is a more comprehensive resource on DSA topics - Provides detailed explanations - Gives example implementations in multiple popular programming languages -- [NeetCode.io](https://neetcode.io/) is an excellent resource that classifies LeetCode problems by topic +- [NeetCode.io](https://neetcode.io/) is an excellent resource that classifies LeetCode problems by topic - Lists both Blind 75 and NeetCode 150 LeetCode problems - Provides an algorithms roadmap - Can be used to track your progress @@ -26,9 +26,9 @@ Learn/review: Implement: -- I implement key algorithms myself and commit them to a private repository -- I use the [LeetCode VS Code extension](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode) - to solve LeetCode problems in VS Code +- I implement key algorithms myself and commit them to a private repository +- I use the [LeetCode VS Code extension](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode) + to solve LeetCode problems in VS Code - First I try to solve problems myself - Then I compare it to the most upvoted solutions on LeetCode - Next I comment what I could have done better @@ -37,12 +37,12 @@ Implement: #### Before an online assessment or interview -1. I create a new folder in my LeetCode solutions repo (see the section above for more details) +1. I create a new folder in my LeetCode solutions repo (see the section above for more details) - The file path can be customized using the `leetcode.filePath` VS Code setting -2. I solve Leetcode problems that the company has asked in the past - - Search for relevant Reddit posts - - Can filter LeetCode problems by company using [LeetCode Patterns](https://seanprashad.com/leetcode-patterns/) - - There may be an up-to-date repository that sorts Leetcode problems asked by companies by frequency +2. I solve Leetcode problems that the company has asked in the past + - Search for relevant Reddit posts + - Can filter LeetCode problems by company using [LeetCode Patterns](https://seanprashad.com/leetcode-patterns/) + - There may be an up-to-date repository that sorts Leetcode problems asked by companies by frequency - [The repository for 2022](https://github.com/hxu296/leetcode-company-wise-problems-2022) (last updated May 2022) #### After an online assessment or interview @@ -116,11 +116,11 @@ For more, see Programiz [adjacency list](https://www.programiz.com/dsa/graph-adj Comparing two popular search algorithms. -| Basis for comparison | Breadth-first search | Depth-first search | -| --------------------- | ------------------------------------- | ------------------ | -| Edge types | Discovery and cross | Discovery and back | -| Implemented using | Queue | Stack | -| Used for | Shortest path from root to any vertex | Topological sort | +| Basis for comparison | Breadth-first search | Depth-first search | +| -------------------- | ------------------------------------- | ------------------ | +| Edge types | Discovery and cross | Discovery and back | +| Implemented using | Queue | Stack | +| Used for | Shortest path from root to any vertex | Topological sort | Common features: @@ -131,10 +131,10 @@ For more, see Programiz [BFS](https://www.programiz.com/dsa/graph-bfs) and [DFS] #### Greedy algorithms -- Dijkstra: finds shortest path of directed graph with nonnegative edge weights +- Dijkstra: finds shortest path of directed graph with nonnegative edge weights - Checks `D(u) + w(u, v)` for being less `D(v)` in RELAX. -- Kruskal: find MST using min heap of edge weights in $O(m\log n)$ -- Prim: find MST of undirected graph +- Kruskal: find MST using min heap of edge weights in $O(m\log n)$ +- Prim: find MST of undirected graph - Checks `w(u, v)` for being less than `D(v)` in RELAX. For more, see [Programiz greedy algorithms notes](https://www.programiz.com/dsa/greedy-algorithm). @@ -143,13 +143,13 @@ For more, see [Programiz greedy algorithms notes](https://www.programiz.com/dsa/ Definitions: -- $P$: all decision problems that can be solved in polynomial time -- $NP$: all decision problems for which the instances where the answer is "yes" have proofs that can be verified in - \[nondeterministic\] polynomial time +- $P$: all decision problems that can be solved in polynomial time +- $NP$: all decision problems for which the instances where the answer is "yes" have proofs that can be verified in + \[nondeterministic\] polynomial time - Has an efficient verifier, but **may not** have an efficient solver -- NP-complete: all problems in $NP$ which can be reduced to any other $NP$ problem in polynomial time +- NP-complete: all problems in $NP$ which can be reduced to any other $NP$ problem in polynomial time - Has an efficient verifier, but **does not** have an efficient solver -- NP-hard: all problems that are reducible to a known NP-complete problem (like boolean satisfiability, SAT) +- NP-hard: all problems that are reducible to a known NP-complete problem (like boolean satisfiability, SAT) - Any NP-complete problem can be reduced to any NP-hard problem in polynomial time → all NP-complete problems can be reduced to any NP-hard problem in polynomial time → if there is a solution to one NP-hard problem in polynomial time, there is a solution all $NP$ problems in @@ -159,9 +159,9 @@ For more, see [this StackOverflow answer](https://stackoverflow.com/a/1857342). Proving a problem $P$ is NP-complete: -1. Prove that $P$ is in $NP$ +1. Prove that $P$ is in $NP$ - Show what kind of proof for instances where the answer is "yes" can be checked in polynomial time -2. Prove that $P$ can be reduced to a $NP$ problem in polynomial time +2. Prove that $P$ can be reduced to a $NP$ problem in polynomial time - Give a polynomial time algorithm that transforms instances of a known NP-complete problem into instances of $P$ with the same answer diff --git a/docs/reference/bookmarks.md b/docs/reference/bookmarks.md index 309ebdd..d6199b1 100644 --- a/docs/reference/bookmarks.md +++ b/docs/reference/bookmarks.md @@ -10,11 +10,11 @@ Miscellaneous references and tools that I use unrelated to the other pages. ## Tools -- [Bitwarden](https://bitwarden.com/) - password manager -- [Inkdrop](https://www.inkdrop.app/) - material design markdown notetaking app for developers -- [Notion](https://www.notion.so/product) - notetaking and project management +- [Bitwarden](https://bitwarden.com/) - password manager +- [Inkdrop](https://www.inkdrop.app/) - material design markdown notetaking app for developers +- [Notion](https://www.notion.so/product) - notetaking and project management - [Video introduction to Notion](https://www.youtube.com/watch?v=ODl5FOMu8kI&t=380s) - Students get the Personal Pro plan for free -- [TinyWow](https://tinywow.com/) - various PDF, image, and video tools -- [Wandb](https://wandb.ai/site) - better data analytics, tailored for machine learning applications +- [TinyWow](https://tinywow.com/) - various PDF, image, and video tools +- [Wandb](https://wandb.ai/site) - better data analytics, tailored for machine learning applications - [Example Wandb report](https://wandb.ai/ubcsailbot/path-evaluation-planners2/reports/Planner-Comparison--Vmlldzo4NDA0NDQ) diff --git a/docs/reference/git/git_advanced.md b/docs/reference/git/git_advanced.md index ee55a66..5b083c7 100644 --- a/docs/reference/git/git_advanced.md +++ b/docs/reference/git/git_advanced.md @@ -109,24 +109,24 @@ There may be cases where you want to keep mirrors of your repository. - The original remote repository is given the identifier `origin` by default -| Command | Description | -| --------- | ----------- | +| Command | Description | +| ------------------------------------------------ | ---------------------------------------------------------------- | | `git remote add .git` | Add a remote repository and give it the identifier `` | -| `git push --all` | Push all branches to a remote repository | -| `git remote -v` | List remote repositories | -| `git remote remove ` | Remove a remote repository | +| `git push --all` | Push all branches to a remote repository | +| `git remote -v` | List remote repositories | +| `git remote remove ` | Remove a remote repository | ## Submodules Add a Git repository inside another Git repository, usually to serve as a dependency. -| Command | Description | -| --------- | ----------- | -| `git submodule add .git` | Add a repository as a submodule of the current repository | -| `git diff --submodule` | Better diff for submodules from the parent repository | -| `git submodule update --remote --merge` | Update submodules to their latest remote commits | -| `git submodule update --init --recursive` | Recursively initialize and update submodules to the commits in the remote parent repository | -| `git clone --recurse-submodules .git` | Clone a repository and recursively initialize all its submodules | +| Command | Description | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `git submodule add .git` | Add a repository as a submodule of the current repository | +| `git diff --submodule` | Better diff for submodules from the parent repository | +| `git submodule update --remote --merge` | Update submodules to their latest remote commits | +| `git submodule update --init --recursive` | Recursively initialize and update submodules to the commits in the remote parent repository | +| `git clone --recurse-submodules .git` | Clone a repository and recursively initialize all its submodules | Resources: @@ -139,13 +139,13 @@ Resources: Tag a commit. I usually create tags as part of [publishing a release on GitHub](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository), but the CLI commands may come in handy if you want to delete a release and its associated tag. -| Command | Description | -| --------- | ----------- | -| `git tag -d ` | Delete local tag | +| Command | Description | +| ------------------------------------------ | ---------------------------------------------- | +| `git tag -d ` | Delete local tag | | `git tag -a -m ""` | Create an annotated tag for the current commit | -| `git push --tags` | Push tags to the remote repository | -| `git show ` | See tag information | -| `git checkout ` | Checkout to the commit that a tag points to | +| `git push --tags` | Push tags to the remote repository | +| `git show ` | See tag information | +| `git checkout ` | Checkout to the commit that a tag points to | Resources: @@ -155,13 +155,13 @@ Resources: Git work trees allow you to have allow you to develop multiple branches of a repository at the same time. -| Command | Description | -| --------- | ----------- | -| `git clone --bare .git` | Clone a repository as a bare repository | -| `git worktree add ` | Create a work tree at the specified location, checking out to the branch of the same name or creating one if it does not exist | -| `git worktree add -b ` | Same as above, but needed if `` contains forward slashes | -| `git worktree list` | List all work trees | -| `git worktree remove ` | Remove a worktree at the specified location | +| Command | Description | +| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `git clone --bare .git` | Clone a repository as a bare repository | +| `git worktree add ` | Create a work tree at the specified location, checking out to the branch of the same name or creating one if it does not exist | +| `git worktree add -b ` | Same as above, but needed if `` contains forward slashes | +| `git worktree list` | List all work trees | +| `git worktree remove ` | Remove a worktree at the specified location | Resources: diff --git a/docs/reference/git/git_commands.md b/docs/reference/git/git_commands.md index a4cb2d3..eb41497 100644 --- a/docs/reference/git/git_commands.md +++ b/docs/reference/git/git_commands.md @@ -6,12 +6,12 @@ Useful Git commands that build on top of the add, commit, and push workflow. File specifiers are used in commands like `add`, [`restore`](#restore), and [`rm`](#rm) to specify which file(s) to apply to. - | Specifier | Description | - | --------- | ----------- | - | `-u` | Files in the remote repository that were **modified** in the current directory | - | `.` | Everything **new or modified** in current directory | - | `` | Everything **new or modified** in a directory | - | `` | **New or modified** file | + | Specifier | Description | + | --------------------- | ------------------------------------------------------------------------------ | + | `-u` | Files in the remote repository that were **modified** in the current directory | + | `.` | Everything **new or modified** in current directory | + | `` | Everything **new or modified** in a directory | + | `` | **New or modified** file | Use `git status` to check if the command had the desired outcome. @@ -22,15 +22,15 @@ in most scenarios. To avoid duplicate commits I do not merge the branch with the into the main branch. I use cherry picking to clean up a branch's commit history when changing which branch its PR is merging into. -| Command | Description | -| --------- | ----------- | -| `git cherry-pick ` | Add commit to the current branch | +| Command | Description | +| --------------------------------------------------- | --------------------------------------------------------------------------------- | +| `git cherry-pick ` | Add commit to the current branch | | `git cherry-pick ^..` | Add commits from A to B inclusive, where A is older than B, to the current branch | ## log -| Command | Description | -| --------- | ----------- | +| Command | Description | +| --------- | ---------------------------------------------- | | `git log` | Check the commit history of the current branch | ## mv @@ -40,42 +40,42 @@ Instead, it thinks the file was deleted and a new one was created, which wipes i To preserve file history, commit the move before making any changes to the file. This is most easily done with the `git mv` command. -| Command | Description | -| --------- | ----------- | +| Command | Description | +| --------------------------------------- | ----------------------------- | | `git mv ` | Like `mv` but stages the move | ## reset Undo committed (but not pushed) changes. -| Command | Description | -| --------- | ----------- | -| `git reset HEAD~1` | Unstage the changes made in last commit, but do not modify the files | -| `git reset --hard HEAD~5` | Undo the changes made in the last 5 commits | +| Command | Description | +| ------------------------- | -------------------------------------------------------------------- | +| `git reset HEAD~1` | Unstage the changes made in last commit, but do not modify the files | +| `git reset --hard HEAD~5` | Undo the changes made in the last 5 commits | ## restore Undo uncommitted changes. -| Command | Description | -| --------- | ----------- | -| `git restore ` | Revert files to their state on the remote repository (delete local changes) | -| `git restore --staged ` | Unstage/un-add files | +| Command | Description | +| --------------------------------------- | --------------------------------------------------------------------------- | +| `git restore ` | Revert files to their state on the remote repository (delete local changes) | +| `git restore --staged ` | Unstage/un-add files | ## rm Remove files -| Command | Description | -| --------- | ----------- | -| `git rm ` | Remove files from Git and delete them | +| Command | Description | +| ---------------------------------- | -------------------------------------------- | +| `git rm ` | Remove files from Git and delete them | | `git rm --cached ` | Remove files from Git but do not delete them | ## stash Stash uncommitted changes so that you can pull or switch branches. -| Command | Description | -| --------- | ----------- | -| `git stash` | Stash changes | +| Command | Description | +| --------------- | --------------- | +| `git stash` | Stash changes | | `git stash pop` | Restore changes | diff --git a/docs/reference/git/git_contributing.md b/docs/reference/git/git_contributing.md index 493d75f..3bf99bd 100644 --- a/docs/reference/git/git_contributing.md +++ b/docs/reference/git/git_contributing.md @@ -3,6 +3,7 @@ For a walkthrough of the contribution process, read [First Contributions](https://github.com/firstcontributions/first-contributions/blob/master/README.md). !!! note "Comments on the First Contributions walkthrough" + - If you have access to the repository, there is no need to fork it; clone and work on the repository itself ## Goals @@ -19,9 +20,9 @@ For a walkthrough of the contribution process, read [First Contributions](https: ## Commits -- Make a commit for each unit change, giving it a descriptive name +- Make a commit for each unit change, giving it a descriptive name - For example: "added `` function", "updated tests to match" -- At the end of a session `git push`, to update the remote repository with your changes +- At the end of a session `git push`, to update the remote repository with your changes ## Pull requests @@ -32,13 +33,13 @@ Compared to committing directly to the main branch, pull requests can be used to Creating a pull request: -- Describe changes, expected behavior, and how to verify -- Link pull request to the issue it resolves: [linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) -- Can create as a draft if incomplete, which disables merging +- Describe changes, expected behavior, and how to verify +- Link pull request to the issue it resolves: [linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) +- Can create as a draft if incomplete, which disables merging - New commits to the branch will be automatically added to the pull request -- Add reviewers to test the pull request -- Once the pull request is ready to merge into the main branch, I recommend the "Squash and Merge" merge method to keep the main branch commit history clear and concise, -or "Rebase and Merge" for hotfixes and one off commits +- Add reviewers to test the pull request +- Once the pull request is ready to merge into the main branch, I recommend the "Squash and Merge" merge method to keep the main branch commit history clear and concise, + or "Rebase and Merge" for hotfixes and one off commits - Learn more about [GitHub merge types and best practices](https://rietta.com/blog/github-merge-types/) ## Updating your local repository @@ -58,25 +59,25 @@ git merge origin/main git remote prune origin ``` -- Make `git pull` or `git fetch` prune by default with `git config --global fetch.prune true` - - Local branches tracking a remote that has been prunes are identified as gone in the output of `git branch -vv` +- Make `git pull` or `git fetch` prune by default with `git config --global fetch.prune true` + - Local branches tracking a remote that has been prunes are identified as gone in the output of `git branch -vv` - Delete these branches with `git branch -D ...` - - Reference: [Cleaning up old remote git branches](https://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches) + - Reference: [Cleaning up old remote git branches](https://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches) ## GitHub-specific best practices -- Labels: [GitHub labels best practices](https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63) -- Milestones and projects: [Milestones vs. projects](https://stackoverflow.com/a/39701381) -- Releases: [Releasing Projects on GitHub](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases) -- Discussions: gather feedback and ideas from non-code collaborators +- Labels: [GitHub labels best practices](https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63) +- Milestones and projects: [Milestones vs. projects](https://stackoverflow.com/a/39701381) +- Releases: [Releasing Projects on GitHub](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases) +- Discussions: gather feedback and ideas from non-code collaborators - [Best practices for community conversations](https://docs.github.com/en/discussions/guides/best-practices-for-community-conversations-on-github) -- Actions: automate, customize, and execute software development workflows +- Actions: automate, customize, and execute software development workflows - [Actions documentation](https://docs.github.com/en/actions) - [GitHub Marketplace - Actions](https://github.com/marketplace?type=actions) - [Explanation of this project's workflows](https://github.com/patrick-5546/notes#ci) - [Encrypted secrets documentation](https://docs.github.com/en/actions/security-guides/encrypted-secrets) -- Wiki: host very basic documentation, -[GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) only +- Wiki: host very basic documentation, + [GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) only - [Advanced Formatting in GitHub Markdown](https://gist.github.com/apaskulin/1ad686e42c7165cb9c22f9fe1e389558) - [Render a code snippet in an issue](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-code) -- [Choosing the right open source license](https://choosealicense.com/) +- [Choosing the right open source license](https://choosealicense.com/) diff --git a/docs/reference/python.md b/docs/reference/python.md index 3da6689..ced2926 100644 --- a/docs/reference/python.md +++ b/docs/reference/python.md @@ -2,9 +2,9 @@ ## Conventions -- [PEP 8 styling guideline walkthrough](https://realpython.com/python-pep8/) +- [PEP 8 styling guideline walkthrough](https://realpython.com/python-pep8/) - [Using the flake8 linter](https://flake8.pycqa.org/en/latest/user/invocation.html) - checks for errors (including failing to comply with PEP 8 guidelines -- [Meaning and naming conventions around single and double underscores](https://dbader.org/blog/meaning-of-underscores-in-python) +- [Meaning and naming conventions around single and double underscores](https://dbader.org/blog/meaning-of-underscores-in-python) ## Imports @@ -15,16 +15,17 @@ Package installer. -| Command | Description | -| ------- | ----------- | -| `pip install ` | Install the latest version of a package | -| `pip install ==` | Install the specified version of a package | -| `pip install -r requirements.txt` | Install the packages from a `requirements.txt` file | -| `pip list --outdated` | View outdated packages | -| `pip install --upgrade ` | Upgrade the desired packages | -| `pip uninstall ` | Uninstall a package | +| Command | Description | +| ---------------------------------- | --------------------------------------------------- | +| `pip install ` | Install the latest version of a package | +| `pip install ==` | Install the specified version of a package | +| `pip install -r requirements.txt` | Install the packages from a `requirements.txt` file | +| `pip list --outdated` | View outdated packages | +| `pip install --upgrade ` | Upgrade the desired packages | +| `pip uninstall ` | Uninstall a package | !!! tip "" + If pip has not been added to the path, replace `pip` with `python -m pip` in the commands above. ## Pyenv @@ -47,7 +48,7 @@ Easily switch between multiple versions of Python. Bundle all the packages and their versions to run an application so that they do not conflict with the globally installed python packages. -1. Create virtual environment directory (suggested name: `.venv`). +1. Create virtual environment directory (suggested name: `.venv`). === ":material-microsoft-windows: Windows" @@ -61,7 +62,7 @@ Bundle all the packages and their versions to run an application so that they do python3 -m venv .venv ``` -2. Activate virtual environment. Use the active shell's corresponding `activate` script. +2. Activate virtual environment. Use the active shell's corresponding `activate` script. === ":material-powershell: Windows Powershell" @@ -75,21 +76,22 @@ Bundle all the packages and their versions to run an application so that they do source .venv/bin/activate ``` -3. Install the required packages: [pip section](#pip) +3. Install the required packages: [pip section](#pip) -4. Create/update the `requirements.txt` file (to record the versions of packages used in the project) +4. Create/update the `requirements.txt` file (to record the versions of packages used in the project) ``` sh pip freeze > requirements.txt ``` -5. Exit the virtual environment +5. Exit the virtual environment ``` sh deactivate ``` !!! tip "VS Code integration" + After selecting `.venv/bin/python` to be the Python interpreter, terminals and debuggers will run in the virtual environment by default. diff --git a/docs/reference/shortcuts.md b/docs/reference/shortcuts.md index f75aa66..ae7b3a6 100644 --- a/docs/reference/shortcuts.md +++ b/docs/reference/shortcuts.md @@ -1,84 +1,85 @@ # :material-keyboard: Windows Keyboard Shortcuts !!! note "" + Shortcuts with italicized descriptions are Windows 11 only. ## General -| Shortcut | Description | -| -------- | ----------- | -| ++alt+tab++ | Switch between open windows and browser tabs | -| ++ctrl+shift+esc++ | Open task manager | -| ++win++ | Show or hide the start menu | -| ++win+a++ | *Show or hide the quick settings* | -| ++win+d++ | Show or hide the desktop | -| ++win+g++ | Open Xbox Game Bar (built-in video capture) | -| ++win+l++ | Lock the computer | -| ++win+n++ | *Open notification center and calendar* | -| ++win+shift+s++ | Take a screenshot using Snipping Tool | -| ++win+arrow-up++ | Maximize window | +| Shortcut | Description | +| ------------------------------------------ | ---------------------------------------------------- | +| ++alt+tab++ | Switch between open windows and browser tabs | +| ++ctrl+shift+esc++ | Open task manager | +| ++win++ | Show or hide the start menu | +| ++win+a++ | _Show or hide the quick settings_ | +| ++win+d++ | Show or hide the desktop | +| ++win+g++ | Open Xbox Game Bar (built-in video capture) | +| ++win+l++ | Lock the computer | +| ++win+n++ | _Open notification center and calendar_ | +| ++win+shift+s++ | Take a screenshot using Snipping Tool | +| ++win+arrow-up++ | Maximize window | | ++win++ + ++arrow-left++ / ++arrow-right++ | Maximize window to the left/right side of the screen | -| ++f11++ | Full screen application | +| ++f11++ | Full screen application | ## File Explorer -| Shortcut | Description | -| -------- | ----------- | -| ++win+e++ | Open File Explorer | -| ++ctrl+f++ | Select the search box | -| ++ctrl+shift+n++ | Create a new folder | +| Shortcut | Description | +| ---------------- | --------------------- | +| ++win+e++ | Open File Explorer | +| ++ctrl+f++ | Select the search box | +| ++ctrl+shift+n++ | Create a new folder | ## Microsoft Edge -| Shortcut | Description | -| -------- | ----------- | -| ++ctrl+f++ | Find on page | -| (++shift++) + ++enter++ | Navigate between matches to your Find Bar search | -| ++ctrl+h++ | Open history | -| ++ctrl+l++ | Select the URL in the address bar to edit | -| ++ctrl+r++ | Refresh the current tab | -| ++ctrl+t++ | Open a new tab and switch to it | -| ++ctrl+w++ | Close the current tab | -| ++ctrl+shift+w++ | Close the current window | -| ++ctrl+shift+y++ | Open Collections | -| ++ctrl+0++ | Reset zoom | -| ++ctrl++ + ++plus++ / ++minus++ | Adjust zoom | -| ++ctrl++ + (++shift++) + ++tab++ | Navigate between tabs | -| ++ctrl++ + left click | Open link in new tab | -| ++f12++ | Open Developer Tools | +| Shortcut | Description | +| -------------------------------- | ------------------------------------------------ | +| ++ctrl+f++ | Find on page | +| (++shift++) + ++enter++ | Navigate between matches to your Find Bar search | +| ++ctrl+h++ | Open history | +| ++ctrl+l++ | Select the URL in the address bar to edit | +| ++ctrl+r++ | Refresh the current tab | +| ++ctrl+t++ | Open a new tab and switch to it | +| ++ctrl+w++ | Close the current tab | +| ++ctrl+shift+w++ | Close the current window | +| ++ctrl+shift+y++ | Open Collections | +| ++ctrl+0++ | Reset zoom | +| ++ctrl++ + ++plus++ / ++minus++ | Adjust zoom | +| ++ctrl++ + (++shift++) + ++tab++ | Navigate between tabs | +| ++ctrl++ + left click | Open link in new tab | +| ++f12++ | Open Developer Tools | ## OneNote Specifically, the OneNote application from the Microsoft Store. -| Shortcut | Description | -| -------- | ----------- | -| ++ctrl+f++ | Open search box | -| ++arrow-down++| While searching, preview the next result | -| ++ctrl+n++ | Create a new page at the end of the current section | -| ++ctrl+alt+n++ | Create a new page below the current page | -| ++ctrl+alt+shift+n++ | Create a new sub-page below the current page | -| ++ctrl+t++ | Create a new section | -| ++ctrl+period++ | Toggle bulleted list formatting | -| ++ctrl+slash++ | Toggle numbered list formatting | -| ++ctrl+alt++ + ++minus++ / ++plus++ | Hide and show navigation pane | -| ++alt+equal++ | Create equation | -| ++shift+enter++ | Insert a line break | -| ++tab++ at the end of a line | Create a table | +| Shortcut | Description | +| ----------------------------------- | --------------------------------------------------- | +| ++ctrl+f++ | Open search box | +| ++arrow-down++ | While searching, preview the next result | +| ++ctrl+n++ | Create a new page at the end of the current section | +| ++ctrl+alt+n++ | Create a new page below the current page | +| ++ctrl+alt+shift+n++ | Create a new sub-page below the current page | +| ++ctrl+t++ | Create a new section | +| ++ctrl+period++ | Toggle bulleted list formatting | +| ++ctrl+slash++ | Toggle numbered list formatting | +| ++ctrl+alt++ + ++minus++ / ++plus++ | Hide and show navigation pane | +| ++alt+equal++ | Create equation | +| ++shift+enter++ | Insert a line break | +| ++tab++ at the end of a line | Create a table | ## Taskbar -| Shortcut | Description | -| -------- | ----------- | -| ++shift++ + left click | Open an instance of an app | +| Shortcut | Description | +| --------------------------- | ------------------------------- | +| ++shift++ + left click | Open an instance of an app | | ++ctrl+shift++ + left click | Open an app as an administrator | ## Virtual Desktop -| Shortcut | Description | -| -------- | ----------- | -| ++win+tab++ | Open task view | -| ++win+ctrl+d++ | Add a virtual desktop | +| Shortcut | Description | +| ----------------------------------------------- | --------------------------------- | +| ++win+tab++ | Open task view | +| ++win+ctrl+d++ | Add a virtual desktop | | ++win+ctrl++ + ++arrow-left++ / ++arrow-right++ | Navigate between virtual desktops | ## Windows Terminal diff --git a/docs/reference/ssh.md b/docs/reference/ssh.md index cbc5646..921e8e9 100644 --- a/docs/reference/ssh.md +++ b/docs/reference/ssh.md @@ -7,16 +7,18 @@ SSH key-based authentication allows you SSH into remote machines without a passw Guide: [Setup SSH keys](https://linuxize.com/post/how-to-set-up-ssh-keys-on-ubuntu-20-04/) !!! note "Notes on the guide" - - Although the guide is for Ubuntu 20.04, it should work for most Linux distributions + + - Although the guide is for Ubuntu 20.04, it should work for most Linux distributions - It also works in PowerShell, using the given alternative to `ssh-copy-id` ## Other Resources -- [`ssh` command guide](https://linuxize.com/post/ssh-command-in-linux/) -- [Specify the starting directory for a SSH session](https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh#specify-starting-directory) -- [Setup SSH keys on Synology DSM 6](https://stamler.ca/enable-passwordless-ssh-on-synology-dsm6/) +- [`ssh` command guide](https://linuxize.com/post/ssh-command-in-linux/) +- [Specify the starting directory for a SSH session](https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh#specify-starting-directory) +- [Setup SSH keys on Synology DSM 6](https://stamler.ca/enable-passwordless-ssh-on-synology-dsm6/) ??? note "Notes on the Synology guide" + The command to restart the sshd service will likely not work. In this case, telnet in to restart the service diff --git a/docs/reference/unix.md b/docs/reference/unix.md index 2dc357b..3cb9f63 100644 --- a/docs/reference/unix.md +++ b/docs/reference/unix.md @@ -11,11 +11,11 @@ If their site does not have cover the desired content, `man ` to view t Aliases are custom commands that map to a longer command. -| Command | Description | -| ----------- | ------------------------------------ | -| `alias =""` | Create an alias | -| `which ` | Locate an alias/command | -| `alias` | View the mappings of all aliases | +| Command | Description | +| --------------------------- | -------------------------------- | +| `alias =""` | Create an alias | +| `which ` | Locate an alias/command | +| `alias` | View the mappings of all aliases | My shell aliases can be found in [`aliases.zsh`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/zsh/aliases.zsh). @@ -27,11 +27,11 @@ Resources: Estimates disk usage of the given files or directories. -| Command | Description | -| ----------- | ------------------------------------ | -| `du -ha ` | Get size of each file within the directory recursively | -| `du -h --max-depth=1 ` | Get size of directories up to the first level | -| `du -hs` | Get only the size of the current working directory | +| Command | Description | +| --------------------------------- | ------------------------------------------------------ | +| `du -ha ` | Get size of each file within the directory recursively | +| `du -h --max-depth=1 ` | Get size of directories up to the first level | +| `du -hs` | Get only the size of the current working directory | Resources: @@ -41,10 +41,10 @@ Resources: Recursively searches for files and directories. -| Command | Description | -| ------- | ----------- | -| `find -type f -iname ` | Search for files by name, ignoring case | -| `find -type f -name '*.'` | Search for files by extension | +| Command | Description | +| ----------------------------------------- | --------------------------------------- | +| `find -type f -iname ` | Search for files by name, ignoring case | +| `find -type f -name '*.'` | Search for files by extension | Resources: @@ -54,26 +54,26 @@ Resources: Read contents of a file or command output quickly and without filling up terminal. -| Command | Description | -| ------- | ----------- | -| `less ` | Read the contents of a file | +| Command | Description | +| ------------------ | ------------------------------------------------------------------------------- | +| `less ` | Read the contents of a file | | ` | less` | Read the standard output (what would be printed to the terminal) of `` | ??? info "Commands inside less" - | Command | Description | - | ------- | ----------- | - | `h` | Display help | - | `q` | Exit | - | `g` | Go to first line of file | - | *#*`g` | Go to line *#* | - | `G` | Go to last line of file | - | `j`/`k` | Move forward and backward by line | - | `f`/`b` | Move forward and backward by window | - | `-N` | Toggle line numbers | - | `-S` | Toggle chopping long lines | - | `/` | Search for `` | - | `n`/`N` | Navigate between search matches | + | Command | Description | + | ----------- | ----------------------------------- | + | `h` | Display help | + | `q` | Exit | + | `g` | Go to first line of file | + | _#_`g` | Go to line _#_ | + | `G` | Go to last line of file | + | `j`/`k` | Move forward and backward by line | + | `f`/`b` | Move forward and backward by window | + | `-N` | Toggle line numbers | + | `-S` | Toggle chopping long lines | + | `/` | Search for `` | + | `n`/`N` | Navigate between search matches | Resources: @@ -84,15 +84,15 @@ Resources: I use screen to perform long-running tasks on a remote machine. It enables me to connect and disconnect from the machine (i.e. via [SSH](./ssh.md)) without exiting the command. -| Command | Description | -| ----------- | ------------------------------------ | -| `screen -S ` | Start a named screen session | -| `screen -d` | Detach from current screen | -| ++ctrl+alt++ then ++d++ | Detach from current screen when a command is running | -| `screen -ls` | List running screens and their session IDs | -| `screen -r ` | Reattach to screen | -| `screen -d -r ` | Reattach to screen from inside another screen | -| `exit` | Terminate current screen | +| Command | Description | +| --------------------------- | ---------------------------------------------------- | +| `screen -S ` | Start a named screen session | +| `screen -d` | Detach from current screen | +| ++ctrl+alt++ then ++d++ | Detach from current screen when a command is running | +| `screen -ls` | List running screens and their session IDs | +| `screen -r ` | Reattach to screen | +| `screen -d -r ` | Reattach to screen from inside another screen | +| `exit` | Terminate current screen | ??? bug "`screen` in WSL" @@ -105,11 +105,11 @@ I use screen to perform long-running tasks on a remote machine. It enables me to To Fix - 1. Create an alternate screen directory with the appropriate permissions + 1. Create an alternate screen directory with the appropriate permissions ``` mkdir ~/.screen && chmod 700 ~/.screen ``` - 2. Point the `SCREENDIR` environment variable to that directory + 2. Point the `SCREENDIR` environment variable to that directory ``` shell title=".bashrc file or equivalent" export SCREENDIR=$HOME/.screen ``` diff --git a/docs/reference/wsl.md b/docs/reference/wsl.md index 2b5ec3f..2b6964e 100644 --- a/docs/reference/wsl.md +++ b/docs/reference/wsl.md @@ -2,46 +2,46 @@ ## Backing up and Restoring WSL Distributions -1. Export a WSL distribution for backup/migration from PowerShell +1. Export a WSL distribution for backup/migration from PowerShell ``` powershell wsl --export ``` -2. To import a WSL distribution from PowerShell +2. To import a WSL distribution from PowerShell ``` powershell wsl --import ``` -3. This new WSL distribution will start as the root user. To start as another user, add the following to `/etc/wsl.conf` from inside the distribution +3. This new WSL distribution will start as the root user. To start as another user, add the following to `/etc/wsl.conf` from inside the distribution ``` yaml linenums="1" title="wsl.conf" [user] default= ``` -4. `#!powershell wsl --shutdown` from PowerShell and restart to see the change +4. `#!powershell wsl --shutdown` from PowerShell and restart to see the change ## More WSL Commands -| Command | Description | -| ------- | ----------- | -| `wsl -l -v` | List WSL distributions along with their state and version | -| `wsl -t ` | Terminate/shut down a WSL distribution | -| `wsl --unregister ` | Unregisters WSL distribution and deletes root filesystem | +| Command | Description | +| -------------------------------------- | --------------------------------------------------------- | +| `wsl -l -v` | List WSL distributions along with their state and version | +| `wsl -t ` | Terminate/shut down a WSL distribution | +| `wsl --unregister ` | Unregisters WSL distribution and deletes root filesystem | - `wsl --help` to see all WSL commands and their descriptions ## Commands Inside WSL Distributions -- Sign in to Git using the Git Credential Manager in Windows +- Sign in to Git using the Git Credential Manager in Windows ``` sh git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe" ``` -- Open a WSL file/directory using the Windows default program +- Open a WSL file/directory using the Windows default program - For example: File Explorer for directories, Excel for CSV files ``` sh diff --git a/docs/reference/zensical.md b/docs/reference/zensical.md index e84ad5e..91672d4 100644 --- a/docs/reference/zensical.md +++ b/docs/reference/zensical.md @@ -20,12 +20,12 @@ and it is where the team now develops new features, so I moved the site to it. ### Project Layout -| Path | Contents | -| ---- | -------- | -| `docs/` | A Markdown file for every page, and the images and JavaScript they use | -| `includes/abbreviations.md` | The glossary, which every page gets | -| `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | -| `zensical-studio.toml` | Zensical Studio's lint rules | +| Path | Contents | +| --------------------------- | -------------------------------------------------------------------------------- | +| `docs/` | A Markdown file for every page, and the images and JavaScript they use | +| `includes/abbreviations.md` | The glossary, which every page gets | +| `zensical.toml` | The site's configuration: the page tree, theme, plugins, and Markdown extensions | +| `zensical-studio.toml` | Zensical Studio's lint rules | The [README](https://github.com/patrick-5546/notes) explains how to install Zensical and run it, and the repository's other tools. @@ -52,11 +52,11 @@ nav = [ Zensical has its own implementations of popular MkDocs plugins, so they need no installation: - [git-revision-date-localized](https://zensical.org/docs/compatibility/mkdocs/plugins/#git-revision-date-localized): - the date of each page's last change, from its Git history + the date of each page's last change, from its Git history - [social](https://zensical.org/docs/compatibility/mkdocs/plugins/#social): a card for each page, shown when a link to it is shared - [glightbox](https://zensical.org/docs/compatibility/mkdocs/plugins/#glightbox): opens images in a lightbox - [llmstxt](https://zensical.org/docs/compatibility/mkdocs/plugins/#llmstxt): `llms.txt` and `llms-full.txt` for language models, - and the "Copy as Markdown" button at the top of each page + and the "Copy as Markdown" button at the top of each page - [Search](https://zensical.org/docs/setup/search/), which is always on ### Drafts @@ -103,11 +103,11 @@ WSL is a term in the glossary. ### Table, keyboard keys -| Shortcut | Description | -| ----------- | ------------------------------------ | -| ++alt++ + (++shift++) + ++tab++ | Navigate between windows | +| Shortcut | Description | +| ------------------------------------------------- | --------------------------------- | +| ++alt++ + (++shift++) + ++tab++ | Navigate between windows | | ++windows+ctrl++ + ++arrow-left++/++arrow-right++ | Navigate between virtual desktops | -| ++f11++ | Fullscreen | +| ++f11++ | Fullscreen | ### Task list, inline math equations diff --git a/docs/setup/ide.md b/docs/setup/ide.md index 0e34492..47c92d4 100644 --- a/docs/setup/ide.md +++ b/docs/setup/ide.md @@ -65,26 +65,26 @@ Resources: In addition to the Vim extension and language and framework extension packs, I found the following extensions to be useful: -| Extension Name | Description | -| ----------- | ------------------------------------ | -| Edit csv | View and edit csv files with a table UI | -| Git History | View git log, file history, compare branches or commits | -| GitLens | See who committed each line of code and when they did it | -| Live Share Extension Pack | Real-time collaborative development | -| Path Intellisense | Autocomplete filenames | -| Peacock | Change workspace border color to be able to quickly identify workspaces | -| Remote Development | Support for development using WSL, SSH, and Docker | -| toggle semicolon | ++ctrl+semicolon++ to add or remove the semicolon at the end of a line | -| vscode-icons | Clean file icons for the file explorer | -| vscode-pdf | Display pdf file in VS Code | +| Extension Name | Description | +| ------------------------- | ----------------------------------------------------------------------- | +| Edit csv | View and edit csv files with a table UI | +| Git History | View git log, file history, compare branches or commits | +| GitLens | See who committed each line of code and when they did it | +| Live Share Extension Pack | Real-time collaborative development | +| Path Intellisense | Autocomplete filenames | +| Peacock | Change workspace border color to be able to quickly identify workspaces | +| Remote Development | Support for development using WSL, SSH, and Docker | +| toggle semicolon | ++ctrl+semicolon++ to add or remove the semicolon at the end of a line | +| vscode-icons | Clean file icons for the file explorer | +| vscode-pdf | Display pdf file in VS Code | ### Quirks Several quirks that I have noticed with my VS Code configuration: -- Undo and redo behavior is different in Vim and VS Code. Thus saving a file, making a change, then using ++u++ to undo will not bring the file back to its saved state +- Undo and redo behavior is different in Vim and VS Code. Thus saving a file, making a change, then using ++u++ to undo will not bring the file back to its saved state - Workarounds: enable auto-saving or map ++u++ and ++ctrl+r++ to the VS Code implementation of undo and redo -- "Quick Fix" on Windows and Linux (++ctrl+comma++) is overridden by my toggle semicolon extension +- "Quick Fix" on Windows and Linux (++ctrl+comma++) is overridden by my toggle semicolon extension ### Software Infrastructure diff --git a/docs/setup/index.md b/docs/setup/index.md index 7c2e95c..da17d43 100644 --- a/docs/setup/index.md +++ b/docs/setup/index.md @@ -14,6 +14,7 @@ Windows and Linux excel at different things: I use each OS to their advantage by running Windows on my personal device and using WSL to get a Linux environment on it. ??? info "WSL vs dual-boot" + Dual-booting Windows and Linux is another way of running both OS's on a device, but WSL offers very similar performance in the majority of tasks while being much more convenient: WSL distributions can be started in a matter of seconds and can be used simultaneously with Windows apps. Especially with WSL adding the support for Linux GUI apps in Windows 11, there are a @@ -25,14 +26,14 @@ Every switch between using the mouse and keyboard takes time and energy, both of - Vim commands. See the [IDE page](./ide.md#vim-keybindings) to learn more. - Keyboard shortcuts in Windows as much as possible. -See the [Windows Keyboard Shortcuts page](../reference/shortcuts.md) for a list of the shortcuts I frequently use. + See the [Windows Keyboard Shortcuts page](../reference/shortcuts.md) for a list of the shortcuts I frequently use. ### Same Experience Across Computers and Programs To have the same experience on all the computers I use (personal, work, school, homelab), I: -1. Created a [dotfiles repository](https://github.com/patrick-5546/dotfiles) that contains my dotfiles and an installation script -2. Standardized keyboard shortcuts across programs +1. Created a [dotfiles repository](https://github.com/patrick-5546/dotfiles) that contains my dotfiles and an installation script +2. Standardized keyboard shortcuts across programs - Largely based on my Vim and Microsoft Edge keyboard shortcuts -3. Standardized CLI configuration across shells -4. Wrote these notes so that I remember how everything works +3. Standardized CLI configuration across shells +4. Wrote these notes so that I remember how everything works diff --git a/docs/setup/terminals/windows-terminal.md b/docs/setup/terminals/windows-terminal.md index a0b0cfb..02cc465 100644 --- a/docs/setup/terminals/windows-terminal.md +++ b/docs/setup/terminals/windows-terminal.md @@ -16,12 +16,12 @@ Currently my configuration looks a lot more like my [Unix terminal configuration ## Setup -1. Install a [Nerd Font](https://www.nerdfonts.com/font-downloads) +1. Install a [Nerd Font](https://www.nerdfonts.com/font-downloads) - The fonts I use can be found in [`windows/fonts/`](https://github.com/patrick-5546/setup/tree/master/windows/fonts) of my setup repository (currently I only use FiraCode) -2. My settings, themes, and profiles can be found in [`reference_dotfiles/windows_terminal/windows_terminal_settings.json`](https://github.com/patrick-5546/dotfiles/blob/main/reference_dotfiles/windows_terminal/windows_terminal_settings.json) - of the dotfiles repository +2. My settings, themes, and profiles can be found in [`reference_dotfiles/windows_terminal/windows_terminal_settings.json`](https://github.com/patrick-5546/dotfiles/blob/main/reference_dotfiles/windows_terminal/windows_terminal_settings.json) + of the dotfiles repository - The icons I use can be found in [`windows/icons/`](https://github.com/patrick-5546/setup/tree/master/windows/icons) of my setup repository ## Shortcuts @@ -32,14 +32,14 @@ All the available shortcuts are listed in the `Actions` tab of the settings page | Shortcut | Description | Similarity | | --------------------------------------- | ----------------------------- | ------------------------------------------ | -| ++ctrl+w++ | Close pane | *Microsoft Edge* | -| ++ctrl+shift+w++ | Close window | *Microsoft Edge* | +| ++ctrl+w++ | Close pane | _Microsoft Edge_ | +| ++ctrl+shift+w++ | Close window | _Microsoft Edge_ | | ++alt+shift+d++ | Duplicate pane | | | ++ctrl+shift+d++ | Duplicate tab | | -| ++alt++ + ++j++ / ++h++ / ++l++ / ++k++ | Move focus down/left/right/up | [*My tmux setup*](./unix-terminal.md#tmux) | +| ++alt++ + ++j++ / ++h++ / ++l++ / ++k++ | Move focus down/left/right/up | [_My tmux setup_](./unix-terminal.md#tmux) | | ++ctrl+tab++ | Next tab | Microsoft Edge | | ++ctrl+shift+space++ | Open new tab dropdown | | -| ++ctrl+shift++ + *#* | Switch to tab, index:*#* | | +| ++ctrl+shift++ + _#_ | Switch to tab, index:_#_ | | | ++ctrl+shift+p++ | Toggle command palette | VS Code | I also removed some default shortcuts: diff --git a/pyproject.toml b/pyproject.toml index 5b1e3b6..a34126f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,8 +17,9 @@ exclude-newer = "7 days" # Python Markdown, which nests lists, and the content of admonitions and tabs, by four spaces, and # its extensions, such as admonitions, content tabs and snippets. flavor = "mkdocs" -# No line length limit, as in Zensical's own docs. -disable = ["MD013"] +# No line length limit, as in Zensical's own docs. Zensical Studio's formatter starts a list item's +# text at its nested content's four-space indent, so the spaces after a list marker vary. +disable = ["MD013", "MD030"] # The issue template's bold prompts, and its blank lines to fill in. exclude = [".github/ISSUE_TEMPLATE"] From d050355f80a9610d79c51fa1b0a5105dcb91ced6 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Tue, 1 Dec 2026 16:50:54 -0700 Subject: [PATCH 19/19] Fail the link check only on dead links On GitHub's runners, four sites refuse requests with 403, and github.com rate-limits its file pages with 503s that lychee's retries don't get past. lychee now accepts 403, 429 and 503, which also covers Stack Overflow, so only LinkedIn's 999 needs an exclude. The token goes too: lychee only uses it to check that a repository exists, which doesn't help with a file page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/links.yml | 3 --- README.md | 6 +++--- lychee.toml | 17 ++++++++--------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index b5bd5cd..e482762 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -31,7 +31,4 @@ jobs: - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 # uv installs the lychee that uv.lock pins, which reads lychee.toml. - name: Check links - env: - # Raises lychee's rate limit for github.com links. - GITHUB_TOKEN: ${{ github.token }} run: make links diff --git a/README.md b/README.md index 4ffa418..b3e1c7d 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,7 @@ On Windows, run the tasks in WSL. | `make links` | Check the links to other sites with [lychee](https://lychee.cli.rs/), which uv installs the first time | | `make clean` | Remove the built site and the build caches | -`make help` lists the tasks. zizmor runs its online audits when `GH_TOKEN` is set, -and lychee gets a higher rate limit for github.com links when `GITHUB_TOKEN` is: +`make help` lists the tasks. zizmor runs its online audits when `GH_TOKEN` is set: for example, `GH_TOKEN=$(gh auth token) make lint`. ## Writing Notes @@ -58,7 +57,8 @@ and lints and formats the pages as you write. It reads the icons from Zensical i - The [CI workflow](.github/workflows/ci.yml) runs `make lint` and `make build` on every push and pull request. - The [Links workflow](.github/workflows/links.yml) runs `make links` every Saturday, on demand, - and on pull requests that change it or `lychee.toml`, which excludes the sites that refuse automated requests. + and on pull requests that change it or `lychee.toml`. + Only dead links fail it, not sites that refuse or rate-limit automated requests. - The [Deploy workflow](.github/workflows/deploy.yml) publishes the site, as the [Zensical page](https://patrick-5546.github.io/notes/reference/zensical/#building-and-deploying) explains. diff --git a/lychee.toml b/lychee.toml index 56b208d..e373fbc 100644 --- a/lychee.toml +++ b/lychee.toml @@ -1,16 +1,15 @@ # lychee checks the links to other sites, and to files, such as the README's; `zensical build` also # checks the site's own links, and their anchors. -# Sites that refuse automated requests, answering with an error for pages that exist. -exclude = [ - # 999 for every profile - "^https://www\\.linkedin\\.com/", - # 403 behind Cloudflare's bot protection - "^https://stackoverflow\\.com/", -] +# Only dead links fail the check. Some sites refuse requests from GitHub's runners with 403, and +# github.com rate-limits them with 429 or 503. +accept = ["200..=299", "403", "429", "503"] -# github.com answers a burst of requests with 503s, so lychee sends each site at most two at a time, -# half a second apart. +# LinkedIn answers 999 for every profile. +exclude = ["^https://www\\.linkedin\\.com/"] + +# github.com answers a burst of requests with 503s, which leaves those pages unchecked, so lychee +# sends each site at most two requests at a time, half a second apart. host_concurrency = 2 host_request_interval = "500ms"