From 8d493f6931cc2c215fef6febfe306e31464065a6 Mon Sep 17 00:00:00 2001 From: alcarney Date: Sun, 4 Aug 2024 18:44:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20alcarney?= =?UTF-8?q?/blog@4e6b6df36eb76c0fefda32d0e7e654d871d2cc7c=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .buildinfo | 2 +- _sources/dotfiles.rst.txt | 22 ++ _sources/dotfiles/bash.rst.txt | 131 ++++++++ _sources/dotfiles/git.rst.txt | 120 +++++++ _sources/index.rst.txt | 37 +- _static/css/styles.css | 20 +- blog/2018/first-article/index.html | 9 +- blog/2018/index.html | 9 +- .../2018/introducing-stylo-doodles/index.html | 9 +- blog/2019/click-drag-vanilla-js/index.html | 9 +- blog/2019/index.html | 9 +- blog/2019/til-python-cmd/index.html | 9 +- blog/2020/ast-simple-eval/index.html | 9 +- blog/2020/hello-world-tinygo-wasm/index.html | 9 +- blog/2020/index.html | 9 +- blog/2020/learning-vulkan-p0/index.html | 9 +- blog/2020/learning-vulkan-p1/index.html | 9 +- .../index.html | 9 +- blog/2021/ast-python-frontend/index.html | 9 +- .../index.html | 9 +- blog/2021/index.html | 9 +- blog/2021/sphinx-and-tailwind/index.html | 9 +- blog/2022/first-steps-with-nix/index.html | 9 +- blog/2022/index.html | 9 +- blog/2023/index.html | 9 +- .../index.html | 9 +- blog/2023/nix-day-to-day/index.html | 9 +- blog/2023/nix-overlays-p2/index.html | 9 +- blog/2023/nix-overlays/index.html | 9 +- blog/2023/python-wasi-nix/index.html | 9 +- blog/archive/index.html | 9 +- blog/atom.xml | 2 +- blog/author/alex-carney/index.html | 9 +- blog/author/index.html | 9 +- blog/drafts/index.html | 9 +- blog/index.html | 9 +- blog/language/en/index.html | 9 +- blog/language/index.html | 9 +- blog/tag/blogging/index.html | 9 +- blog/tag/c/index.html | 9 +- blog/tag/cli/index.html | 9 +- blog/tag/containers/index.html | 9 +- blog/tag/esbonio/index.html | 9 +- blog/tag/go/index.html | 9 +- blog/tag/graphics/index.html | 9 +- blog/tag/index.html | 9 +- blog/tag/js/index.html | 9 +- blog/tag/lsp/index.html | 9 +- blog/tag/lxd/index.html | 9 +- blog/tag/nix/index.html | 9 +- blog/tag/prog-langs/index.html | 9 +- blog/tag/pytest-lsp/index.html | 9 +- blog/tag/python/index.html | 9 +- blog/tag/stylo/index.html | 9 +- blog/tag/svg/index.html | 9 +- blog/tag/til/index.html | 9 +- blog/tag/tinygo/index.html | 9 +- blog/tag/vscode/index.html | 9 +- blog/tag/vulkan/index.html | 9 +- blog/tag/wasm/index.html | 9 +- blog/tag/web/index.html | 9 +- code/ccalc/README/index.html | 9 +- code/ccalc/index.html | 9 +- code/click-drag/README/index.html | 9 +- code/click-drag/index.html | 9 +- code/hello-lsp-web/README/index.html | 9 +- code/hello-lsp-web/index.html | 9 +- code/index.html | 9 +- code/simple-ast/README/index.html | 9 +- code/simple-ast/index.html | 15 +- dotfiles/bash/index.html | 315 ++++++++++++++++++ dotfiles/git/index.html | 294 ++++++++++++++++ dotfiles/index.html | 216 ++++++++++++ genindex/index.html | 9 +- index.html | 69 ++-- notes/custom-jupyter-kernels/index.html | 9 +- notes/custom_directives/index.html | 9 +- .../deserialising-abstract-classes/index.html | 9 +- notes/emacs-subprocesses/index.html | 9 +- notes/git/index.html | 9 +- notes/index.html | 15 +- notes/jinja_templates/index.html | 9 +- notes/npm-global-user-install/index.html | 9 +- notes/pandas/index.html | 9 +- notes/pdfs/index.html | 9 +- notes/prometheus/index.html | 9 +- notes/python-2-gotchas/index.html | 9 +- notes/python-3-gotchas/index.html | 9 +- notes/python-interactive/index.html | 9 +- notes/ripgrep/index.html | 9 +- notes/sphinx-theming/index.html | 9 +- notes/tar-command/index.html | 9 +- notes/vim/index.html | 9 +- notes/writing-makefiles/index.html | 9 +- objects.inv | Bin 1968 -> 2002 bytes search/index.html | 9 +- searchindex.js | 2 +- 97 files changed, 1610 insertions(+), 388 deletions(-) create mode 100644 _sources/dotfiles.rst.txt create mode 100644 _sources/dotfiles/bash.rst.txt create mode 100644 _sources/dotfiles/git.rst.txt create mode 100644 dotfiles/bash/index.html create mode 100644 dotfiles/git/index.html create mode 100644 dotfiles/index.html diff --git a/.buildinfo b/.buildinfo index ce70060..428dc0c 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c94eef32ef14ff13e22c1e099de0941b +config: 50f1f1454f57f38dea5bfad6821e85d2 tags: d77d1c0d9ca2f4c8421862c7c5a0d620 diff --git a/_sources/dotfiles.rst.txt b/_sources/dotfiles.rst.txt new file mode 100644 index 0000000..affb99a --- /dev/null +++ b/_sources/dotfiles.rst.txt @@ -0,0 +1,22 @@ +Dotfiles +======== + +Some of my dotfiles. + +.. grid:: 1 2 2 2 + :gutter: 2 + + .. grid-item-card:: :octicon:`terminal` Bash + :link: /dotfiles/bash + :link-type: doc + + .. grid-item-card:: :octicon:`git-branch` Git + :link: /dotfiles/git + :link-type: doc + + +.. toctree:: + :glob: + :hidden: + + dotfiles/* diff --git a/_sources/dotfiles/bash.rst.txt b/_sources/dotfiles/bash.rst.txt new file mode 100644 index 0000000..0116f9c --- /dev/null +++ b/_sources/dotfiles/bash.rst.txt @@ -0,0 +1,131 @@ +Bash +==== + +Bash configuration + +.. code-block:: make + :filename: Makefile + + .PHONY: bash + bash: + test -L $(HOME)/.bashrc || ln -s $(shell pwd)/bashrc $(HOME)/.bashrc + +Aliases +------- + +.. code-block:: bash + :filename: bashrc + + alias ls='ls -CFhX --color=auto --group-directories-first' + alias pypath='echo $PYTHONPATH | tr '\'':'\'' '\''\n'\''' + + +Options +------- + +I set the following options + +.. code-block:: bash + :filename: bashrc + + shopt -s autocd # If no command found, but matches a directory, cd into it + shopt -s checkjobs # Warn about background jobs before exiting + shopt -s checkwinsize # Update the COLUMNS and LINES environment variables between each command + shopt -s extglob # Enable extended pattern matching features + shopt -s globstar # Enable recursive globbing i.e `./**/*.py` + + +Environment Variables +--------------------- + +``CDPATH`` +^^^^^^^^^^ + +.. code-block:: bash + :filename: bashrc + + [ -d "$HOME/Projects" ] && export CDPATH=".:~/Projects" + +.. pull-quote:: + + The search path for the cd command. + This is a colon separated list of directories in which the shell looks for destination directories specified by the cd command. -- man(1) bash + +This means I can ``cd`` into a project folder from anywhere on my system! + +``PATH`` +^^^^^^^^ + +Update the ``PATH`` based on whatever folders are available. + +.. code-block:: bash + :filename: bashrc + + paths=( + "$HOME/bin" + "$HOME/go/bin" + "$HOME/.cargo/bin" + "$HOME/.local/bin" + "$HOME/.npm-packages/bin" + ) + + for p in ${paths[@]} + do + [ -d $p ] && export PATH="$p:$PATH" + done + + +History +------- + +.. code-block:: bash + :filename: bashrc + + shopt -s histappend + + HISTCONTROL=erasedups + HISTFILESIZE=100000 + HISTIGNORE='cd:ls' + HISTSIZE=10000 + + +Prompt +------ + +.. code-block:: bash + :filename: bashrc + + __venv_py_version() + { + if [ -z "${VIRTUAL_ENV}" ]; then + echo "" + else + echo " 🐍 v$(python --version | sed 's/Python //')" + fi + } + + __is_toolbox() + { + if [ -f /run/.containerenv ] && [ -f /run/.toolboxenv ]; then + name=$(grep name /run/.containerenv | sed 's/.*"\(.*\)"/\1/') + + else + name="\h" + fi + + echo "\[\e[32m\]${name}\[\e[0m\]" + } + + if [ -f "/usr/share/git-core/contrib/completion/git-prompt.sh" ]; then + source "/usr/share/git-core/contrib/completion/git-prompt.sh" + + export GIT_PS1_SHOWDIRTYSTATE=1 # (*) unstaged changes, (+) staged changes + export GIT_PS1_SHOWSTASHSTATE=1 # ($) stashed + export GIT_PS1_SHOWUNTRACKEDFILES=1 # (%) untracked files + export GIT_PS1_SHOWUPSTREAM=verbose + export GIT_PS1_SHOWCOLORHINTS=1 + + export PROMPT_COMMAND='__git_ps1 "\n\w " "$(__venv_py_version)\n$(__is_toolbox) > " "[ %s]"' + else + export PS1="\W\n> " + fi diff --git a/_sources/dotfiles/git.rst.txt b/_sources/dotfiles/git.rst.txt new file mode 100644 index 0000000..fb6c5d1 --- /dev/null +++ b/_sources/dotfiles/git.rst.txt @@ -0,0 +1,120 @@ +Git +=== + +.. code-block:: make + :filename: Makefile + + .PHONY: git + git: + test -L $(HOME)/.gitconfig || ln -s $(shell pwd)/gitconfig $(HOME)/.gitconfig + + +Author +------ + +.. highlight:: none + +Setting basic identity details for commits + +.. code-block:: + :filename: gitconfig + + [user] + name = Alex Carney + email = alcarneyme@gmail.com + + +Aliases +------- + +.. code-block:: + :filename: gitconfig + + [alias] + co = checkout + amend = commit --amend --no-edit # Squash changes into the previous commit + +A nice view of a repository's history + +.. code-block:: + :filename: gitconfig + + hist = log --branches --remotes --tags --graph --oneline --decorate + + +.. code-block:: + + $ git hist + * 9bbbedca (origin/sphinx-8, sphinx-8) lsp: Drop Sphinx 5.x, add support for Sphinx 8.x + * 44f758bc (HEAD -> develop, upstream/develop, origin/develop) Merge branch 'release' into develop + |\ + | * 6a2086c7 (tag: esbonio-vscode-extension-v0.95.1, upstream/release, release) Esbonio VSCode Extension Release v0.95.1 + | * 72be1341 (origin/take-2) code: Update changelog + * | fc194b26 Start testing against 3.13 + * | 306fbaf9 Bump ruff version + * | 4552ff34 [pre-commit.ci] pre-commit autoupdate + * | 5bce0a3c build(deps): bump semver from 7.6.2 to 7.6.3 in /code + * | d02c69ad build(deps-dev): bump @vscode/vsce from 2.30.0 to 2.31.1 in /code + * | 8de0b24a devenv: Install the latest hatch + * | c96bc561 devenv: Bump NodeJS version + ... + + +A better (for some definition of "better") git status command + +.. code-block:: + :filename: gitconfig + + s = !git status -sb && git --no-pager diff --shortstat + +.. code-block:: + + $ git s + ## release...origin/release [ahead 2] + M dotfiles.rst + M dotfiles/bash.rst + ?? dotfiles/.#git.rst + ?? dotfiles/git.rst + 2 files changed, 12 insertions(+), 3 deletions(-) + + +Credential Helper +----------------- + +This tells git to use the `GitHub CLI `__ to authenticate when pushing/pulling from GitHub + +.. code-block:: + :filename: gitconfig + + [credential "https://github.com"] + helper = + helper = !gh auth git-credential + + +Other Options +------------- + +.. code-block:: + :filename: gitconfig + + [commit] + verbose = true + + [core] + editor = nvim + + [diff] + colorMoved = default + + [merge] + conflictstyle = diff3 + + [pull] + rebase = true + + [rerere] + enabled = true + + # Used by forge.el + [github] + user = alcarney diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index 894856f..a00aceb 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -1,11 +1,44 @@ :template: layout.html -.. raw:: html - :file: landing.html +.. grid:: 1 2 2 2 + :gutter: 2 + + .. grid-item-card:: Blog + :link: blog-posts + :link-type: ref + :class-title: text-lg text-green-600 bang!font-normal + :class-card: w-full p-4 prose-sm prose dark:prose-invert transition bg-white dark:bg-gray-800 border dark:border-gray-600 lg:w-1/3 hover:shadow-lg prose-green + + Blog posts, thoughts and ideas. Typically building some small project to figure out how something works. + + .. grid-item-card:: Code + :link: /code + :link-type: doc + :class-title: text-lg text-green-600 bang!font-normal + :class-card: w-full p-4 prose-sm prose dark:prose-invert transition bg-white dark:bg-gray-800 border dark:border-gray-600 lg:w-1/3 hover:shadow-lg prose-green + + A group of small programming projects that typically have one or more blog posts assoicated with them. + + .. grid-item-card:: Dotfiles + :link: /dotfiles + :link-type: doc + :class-title: text-lg text-green-600 bang!font-normal + :class-card: w-full p-4 prose-sm prose dark:prose-invert transition bg-white dark:bg-gray-800 border dark:border-gray-600 lg:w-1/3 hover:shadow-lg prose-green + + My dotfiles as literate configuration, a testing ground for `awdur `__ + + .. grid-item-card:: Notes + :link: /notes + :link-type: doc + :class-title: text-lg text-green-600 bang!font-normal + :class-card: w-full p-4 prose-sm prose dark:prose-invert transition bg-white dark:bg-gray-800 border dark:border-gray-600 lg:w-1/3 hover:shadow-lg prose-green + + A random collection of items that I find useful to refer back to from time to time, but aren't necessarily interesting enough to made into fully fledged blog posts. .. toctree:: :hidden: :maxdepth: 1 code + dotfiles notes diff --git a/_static/css/styles.css b/_static/css/styles.css index 9a3d8c1..f165891 100644 --- a/_static/css/styles.css +++ b/_static/css/styles.css @@ -1860,6 +1860,10 @@ video { line-height: 1.75rem; } +.\!font-normal { + font-weight: 400 !important; +} + .font-bold { font-weight: 700; } @@ -2357,22 +2361,6 @@ kbd { flex-direction: column; } - .lg\:justify-between { - justify-content: space-between; - } - - .lg\:space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); - } - - .lg\:space-y-0 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0px * var(--tw-space-y-reverse)); - } - .lg\:border-4 { border-width: 4px; } diff --git a/blog/2018/first-article/index.html b/blog/2018/first-article/index.html index 78834b7..1ecdb40 100644 --- a/blog/2018/first-article/index.html +++ b/blog/2018/first-article/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

Alex Carney

diff --git a/blog/2018/index.html b/blog/2018/index.html index 2615a8c..965835b 100644 --- a/blog/2018/index.html +++ b/blog/2018/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

Alex Carney

    diff --git a/blog/2018/introducing-stylo-doodles/index.html b/blog/2018/introducing-stylo-doodles/index.html index 4446f38..c0eef30 100644 --- a/blog/2018/introducing-stylo-doodles/index.html +++ b/blog/2018/introducing-stylo-doodles/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

    Alex Carney

    diff --git a/blog/2019/click-drag-vanilla-js/index.html b/blog/2019/click-drag-vanilla-js/index.html index 2dc24be..8983407 100644 --- a/blog/2019/click-drag-vanilla-js/index.html +++ b/blog/2019/click-drag-vanilla-js/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

    Alex Carney

    diff --git a/blog/2019/index.html b/blog/2019/index.html index 60a2462..bd1db2d 100644 --- a/blog/2019/index.html +++ b/blog/2019/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

    Alex Carney

      diff --git a/blog/2019/til-python-cmd/index.html b/blog/2019/til-python-cmd/index.html index 32c93be..65345c9 100644 --- a/blog/2019/til-python-cmd/index.html +++ b/blog/2019/til-python-cmd/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

      Alex Carney

      diff --git a/blog/2020/ast-simple-eval/index.html b/blog/2020/ast-simple-eval/index.html index 47892a3..4df4999 100644 --- a/blog/2020/ast-simple-eval/index.html +++ b/blog/2020/ast-simple-eval/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

      Alex Carney

      diff --git a/blog/2020/hello-world-tinygo-wasm/index.html b/blog/2020/hello-world-tinygo-wasm/index.html index fc58401..4bfa772 100644 --- a/blog/2020/hello-world-tinygo-wasm/index.html +++ b/blog/2020/hello-world-tinygo-wasm/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

      Alex Carney

      diff --git a/blog/2020/index.html b/blog/2020/index.html index 410d1ae..b97b00e 100644 --- a/blog/2020/index.html +++ b/blog/2020/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

      Alex Carney

        diff --git a/blog/2020/learning-vulkan-p0/index.html b/blog/2020/learning-vulkan-p0/index.html index f177b98..22cb625 100644 --- a/blog/2020/learning-vulkan-p0/index.html +++ b/blog/2020/learning-vulkan-p0/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

        Alex Carney

        diff --git a/blog/2020/learning-vulkan-p1/index.html b/blog/2020/learning-vulkan-p1/index.html index 1cbebc7..08db387 100644 --- a/blog/2020/learning-vulkan-p1/index.html +++ b/blog/2020/learning-vulkan-p1/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

        Alex Carney

        diff --git a/blog/2020/passing-strings-between-tinygo-wasm/index.html b/blog/2020/passing-strings-between-tinygo-wasm/index.html index 7486ed4..57cf4e5 100644 --- a/blog/2020/passing-strings-between-tinygo-wasm/index.html +++ b/blog/2020/passing-strings-between-tinygo-wasm/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

        Alex Carney

        diff --git a/blog/2021/ast-python-frontend/index.html b/blog/2021/ast-python-frontend/index.html index 3a74ebf..7ecd29e 100644 --- a/blog/2021/ast-python-frontend/index.html +++ b/blog/2021/ast-python-frontend/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

        Alex Carney

        diff --git a/blog/2021/bringing-esbonio-to-the-browser/index.html b/blog/2021/bringing-esbonio-to-the-browser/index.html index 1e39fd2..0bdf2d3 100644 --- a/blog/2021/bringing-esbonio-to-the-browser/index.html +++ b/blog/2021/bringing-esbonio-to-the-browser/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

        Alex Carney

        diff --git a/blog/2021/index.html b/blog/2021/index.html index 54f2b7d..3e7a8bd 100644 --- a/blog/2021/index.html +++ b/blog/2021/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

        Alex Carney

          diff --git a/blog/2021/sphinx-and-tailwind/index.html b/blog/2021/sphinx-and-tailwind/index.html index 56235c4..6cbfb7b 100644 --- a/blog/2021/sphinx-and-tailwind/index.html +++ b/blog/2021/sphinx-and-tailwind/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

          Alex Carney

          diff --git a/blog/2022/first-steps-with-nix/index.html b/blog/2022/first-steps-with-nix/index.html index d036dde..71cc8c7 100644 --- a/blog/2022/first-steps-with-nix/index.html +++ b/blog/2022/first-steps-with-nix/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

          Alex Carney

          diff --git a/blog/2022/index.html b/blog/2022/index.html index f7c1588..8e5a76f 100644 --- a/blog/2022/index.html +++ b/blog/2022/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

          Alex Carney

            diff --git a/blog/2023/index.html b/blog/2023/index.html index 1e31e40..e396c06 100644 --- a/blog/2023/index.html +++ b/blog/2023/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

            Alex Carney

              diff --git a/blog/2023/integrate-esboino-nvim-with-nix/index.html b/blog/2023/integrate-esboino-nvim-with-nix/index.html index 947dccb..d0243a7 100644 --- a/blog/2023/integrate-esboino-nvim-with-nix/index.html +++ b/blog/2023/integrate-esboino-nvim-with-nix/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

              Alex Carney

              diff --git a/blog/2023/nix-day-to-day/index.html b/blog/2023/nix-day-to-day/index.html index a1eba30..34d57e8 100644 --- a/blog/2023/nix-day-to-day/index.html +++ b/blog/2023/nix-day-to-day/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

              Alex Carney

              diff --git a/blog/2023/nix-overlays-p2/index.html b/blog/2023/nix-overlays-p2/index.html index 2097674..a56b8ff 100644 --- a/blog/2023/nix-overlays-p2/index.html +++ b/blog/2023/nix-overlays-p2/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

              Alex Carney

              diff --git a/blog/2023/nix-overlays/index.html b/blog/2023/nix-overlays/index.html index f77071f..311662a 100644 --- a/blog/2023/nix-overlays/index.html +++ b/blog/2023/nix-overlays/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

              Alex Carney

              diff --git a/blog/2023/python-wasi-nix/index.html b/blog/2023/python-wasi-nix/index.html index 7971b6b..1e1a288 100644 --- a/blog/2023/python-wasi-nix/index.html +++ b/blog/2023/python-wasi-nix/index.html @@ -18,7 +18,7 @@ - + @@ -66,9 +66,10 @@

              Alex Carney

              diff --git a/blog/archive/index.html b/blog/archive/index.html index 57bf1b6..137e9c2 100644 --- a/blog/archive/index.html +++ b/blog/archive/index.html @@ -17,7 +17,7 @@ - + @@ -65,9 +65,10 @@

              Alex Carney