-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 4e6b6df 🚀
- Loading branch information
Showing
97 changed files
with
1,610 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.