Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4e6b6df 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Aug 4, 2024
1 parent e30aa63 commit 8d493f6
Show file tree
Hide file tree
Showing 97 changed files with 1,610 additions and 388 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions _sources/dotfiles.rst.txt
Original file line number Diff line number Diff line change
@@ -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/*
131 changes: 131 additions & 0 deletions _sources/dotfiles/bash.rst.txt
Original file line number Diff line number Diff line change
@@ -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
120 changes: 120 additions & 0 deletions _sources/dotfiles/git.rst.txt
Original file line number Diff line number Diff line change
@@ -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 = [email protected]
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 <https://cli.github.com/>`__ 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
37 changes: 35 additions & 2 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/swyddfa/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
20 changes: 4 additions & 16 deletions _static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,10 @@ video {
line-height: 1.75rem;
}

.\!font-normal {
font-weight: 400 !important;
}

.font-bold {
font-weight: 700;
}
Expand Down Expand Up @@ -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;
}
Expand Down
9 changes: 5 additions & 4 deletions blog/2018/first-article/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx-design.min.css?v=95c83b7e" />


<link rel="stylesheet" type="text/css" href="../../../_static/css/styles.css?v=7c0862aa" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/styles.css?v=c5c4c77e" />


<script src="../../../_static/documentation_options.js?v=187304be"></script>
Expand Down Expand Up @@ -66,9 +66,10 @@ <h2 class=""><a href="/">Alex Carney</a></h2>


<nav class="flex flex-col text-center">
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/blog">Blog</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/code">Code</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/notes">Notes</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/blog">Blog</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/code">Code</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/dotfiles">Dotfiles</a>
<a class="text-green-600 py-1 border-t text-lg hover:bg-gray-50 dark:border-gray-600 dark:hover:bg-gray-900" href="/notes">Notes</a>
</nav>

<div class="flex-shrink overflow-auto">
Expand Down
Loading

0 comments on commit 8d493f6

Please sign in to comment.