Skip to content

Commit

Permalink
2024 update (#33)
Browse files Browse the repository at this point in the history
* Update link

* Fix mkdocs.yml errors

* Simplify requirements.txt

* Hide some launch configurations and update deprecated ones

* OS dependencies already installed

* Update deployment cache config

* Fix lint errors

* Update CLI setup section

* Update terminal setup section

* Add neovim to ide setup sectino

* Revamp other software section to gui section in setup

* Fix dead link

* Ignore leetcode links, now forbidden
  • Loading branch information
patrick-5546 authored Aug 8, 2024
1 parent 4c0dd26 commit 9b629f3
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 178 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ jobs:
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@v2
uses: actions/cache@v4
with:
key: ${{ github.ref }}
key: mkdocs-material-${{ env.cache_id }}
path: .cache

- name: Install OS dependencies
run: sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
restore-keys: |
mkdocs-material-
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{
"pattern": "^https://docs.github.com/"
},
{
"pattern": "^https://leetcode.com/"
},
{
"pattern": "^https://linuxize.com/"
},
Expand Down
8 changes: 7 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"configurations": [
{
"name": "Run Application",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "mkdocs",
"args": [
Expand All @@ -14,12 +14,18 @@
},
{
"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"
Expand Down
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV",
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg"
"!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"
],
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Website for my notes on various programming-related topics.

- Can do this in a [Python virtual environment](https://patrick-5546.github.io/notes/reference/python/#virtual-environments)

3. Manually install [social plugin OS dependencies](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies)
3. Manually install [social plugin OS dependencies](https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/#cairo-graphics)

## Run

Expand Down
24 changes: 2 additions & 22 deletions docs/reference/unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,7 @@ Aliases are custom commands that map to a longer command.
| `which <alias/command>` | Locate an alias/command |
| `alias` | View the mappings of all aliases |

??? quote "My aliases"
Run the commands to see what they do

Oh My Zsh creates a lot of useful aliases, here are some that I regularly use:

``` shell
alias l='ls -lah'
alias ll='ls -lh'
alias md='mkdir -p'
alias rd='rmdir'
```

- Aliases that I use from the Git plugin are detailed in the [Commands page](./git/git_commands.md#oh-my-zsh-git-plugin-aliases)

Aliases that I defined myself

``` shell title="Section of my .zshrc file"
alias cls='clear'
alias h='history'
alias lt='ls -lahrt'
alias llt='ls -lhrt'
```
My shell aliases can be found in [`aliases.zsh`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/zsh/aliases.zsh).

Resources:

Expand Down Expand Up @@ -78,6 +57,7 @@ Read contents of a file or command output quickly and without filling up termina
| Command | Description |
| ------- | ----------- |
| `less <filename>` | Read the contents of a file |
<!-- markdownlint-disable-next-line MD033 -->
| `<command> | less` | Read the standard output (what would be printed to the terminal) of `<command>` |

??? info "Commands inside less"
Expand Down
7 changes: 1 addition & 6 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
mkdocs-git-revision-date-localized-plugin==1.*
mkdocs-material==9.*

# social plugin dependencies

cairosvg
pillow
mkdocs-material[imaging]~=9.0
41 changes: 29 additions & 12 deletions docs/setup/cli/common-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ Its installation instructions can be found in [my dotfiles repository](https://g

I created aliases for my most frequently used commands, and tried to keep them consistent across operating systems.

My Git aliases are from [Oh My Zsh's git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git).
On Windows, they are provided by the [powershell-git-aliases](https://github.com/gluons/powershell-git-aliases) plugin.

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)

### Functions

Expand All @@ -28,15 +26,9 @@ Configuration files:

## Software

### Fzf

[Fzf](https://github.com/junegunn/fzf) is an interactive filer for command line that can be used for any list.
I mainly use it to search through my command history, replacing ++ctrl+r++.

Configuration files:
### Fd

- [`.config/fzf/completion.zsh`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/fzf/completion.zsh)
- [`.config/fzf/key-bindings.zsh`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/fzf/key-bindings.zsh)
[Fd](https://github.com/sharkdp/fd) is an alternative to `find` that is faster and more intuitive.

### Git

Expand All @@ -48,17 +40,42 @@ Configuration file: [`.gitconfig`](https://github.com/patrick-5546/dotfiles/blob
#### Git CLI

[GitHub CLI](https://github.com/cli/cli) brings GitHub functionality such as pull requests and issues to your terminal,
but I only use it to login to GitHub.
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.
It makes `git diff` so much easier to understand.

#### Lazygit

[Lazygit](https://github.com/jesseduffield/lazygit) is a TUI for git that makes viewing diffs and
staging lines (in addition to files) easy.

### Ripgrep

[Ripgrep](https://github.com/BurntSushi/ripgrep) is an alternative to `grep` that is faster and respects your gitignore.

### Lsd

[Lsd](https://github.com/lsd-rs/lsd) is an alternative to `ls` that adds colors, icons, and much more.

### Starship

[Starship](https://starship.rs) is a minimal, blazing-fast, and customizable prompt for any shell.
Since it is compatible with all major operating systems, I can use the same configuration file across operating systems
to achieve a consistent aesthetic.

Configuration file: [`.config/starship.toml`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/starship.toml).

### Yazi

[Yazi](https://github.com/sxyazi/yazi) is a terminal file manager
that can be used to view files and interactively navigate to directories.

### Zoxide

[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"
23 changes: 11 additions & 12 deletions docs/setup/cli/unix-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ changed the cursor shape for different modes, and mapped `jk` to exit insert mod

## Software

[HomeBrew](https://github.com/Homebrew/brew) is an easy-to-use package manager with a large and up-to-date library.
I use it in my installation script because it works on MacOS and any Linux distribution.
[grm](https://github.com/jsnjack/grm) is a basic package manager for GitHub releases.
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).

Resources:
### Atuin

[Atuin](https://github.com/atuinsh/atuin) enhances shell history, saving additional information such as execution time and exit code.
It can even synchronize history between machines!
I mainly use it to interactively search through my command history, replacing ++ctrl+r++.

- [modern-unix](https://github.com/ibraheemdev/modern-unix)
Configuration files:

- [`.config/atuin/config.toml`](https://github.com/patrick-5546/dotfiles/blob/main/dot_config/atuin/config.toml)

### Bat

Expand All @@ -44,11 +51,3 @@ Configuration file: [`.config/bpytop/bpytop.conf`](https://github.com/patrick-55
### Dust

[Dust](https://github.com/bootandy/dust) is an alternative to `du` that is more intuitive, visualizing disk usage.

### Fd

[Fd](https://github.com/sharkdp/fd) is an alternative to `find` that is faster and more intuitive.

### Ripgrep

[Ripgrep](https://github.com/BurntSushi/ripgrep) is an alternative to `grep` that is faster and respects your gitignore.
25 changes: 8 additions & 17 deletions docs/setup/cli/windows-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,20 @@

## Shell: PowerShell 7

PowerShell is a shell for Windows.
PowerShell is a shell for Windows. PowerShell 7 is not the version that Windows includes, and will have to be installed.

Configuration file: [`Documents/PowerShell/Microsoft.PowerShell_profile.ps1`](https://github.com/patrick-5546/dotfiles/blob/main/Documents/PowerShell/Microsoft.PowerShell_profile.ps1).

Resources:
### PSReadLine

- [How to make the ultimate Terminal Prompt on Windows 11](https://www.youtube.com/watch?v=VT2L1SXFq9U&list=LL)
This module brings the Unix CLI experience to PowerShell. I use it to add Vi mode, autocomplete options using ++tab++, and search for commands using ++ctrl+r++.

## Software

[Chocolatey](https://chocolatey.org) is an easy-to-use package manager with a large and up-to-date library.
I didn't use Winget, the official Windows package manager, because being relatively young it does not contain all the packages that I want.
I will likely migrate to Winget once it does. See my Winget documentation [here](../software/windows-software.md#winget).
[UniGetUI](https://github.com/marticliment/UniGetUI) is a GUI for Windows package managers.
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.

Installation script: [`run_install-windows.ps1`](https://github.com/patrick-5546/dotfiles/blob/main/run_install-windows.ps1).
The complete list of apps I install using UniGetUI can be found [here](https://github.com/patrick-5546/dotfiles/tree/main/reference_dotfiles/wingetui).

### Modules

#### git-aliases

[powershell-git-aliases](https://github.com/gluons/powershell-git-aliases) provides partial Git aliases from
[Oh My Zsh's git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git).

#### PSFzf

[PSFzf](https://github.com/kelleyma49/PSFzf) brings the power of [FzF](./common-cli.md#fzf) to PowerShell.
--8<-- "includes/abbreviations.md"
14 changes: 14 additions & 0 deletions docs/setup/gui/windows-gui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Windows GUI

Some of my favorite Windows GUI applications include:

- [Bitwarden](https://github.com/bitwarden/clients): password manager that has apps for all my devices
- [Komorebi](https://github.com/LGUG2Z/komorebi): tiling window manager
- [Microsoft To Do](https://www.microsoft.com/en-ca/microsoft-365/microsoft-to-do-list-app): task management; I especially like the "My Day" list
- [Mozilla Thunderbird](https://www.thunderbird.net/en-US/): email client, as Outlook doesn't play nice with Gmail
- [NanaZip](https://github.com/M2Team/NanaZip): file archiver with a modern UI, forked from 7-Zip
- [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"
15 changes: 12 additions & 3 deletions docs/setup/ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,20 @@ based on the following configurations:

## Vim

I use Vim to quickly modify a file from the terminal. I do not use any plugins, opting to use VS Code when I need a fully-fledged IDE.
Vim is noticeably faster than VS Code for large files.
I use Vim to quickly modify a file from the terminal. I do not use any plugins, opting to use Neovim or VS Code when working on projects.
Vim is noticeably faster than Neovim with plugins or VS Code for large files.

Configuration file: [`.vimrc`](https://github.com/patrick-5546/dotfiles/blob/main/dot_vimrc)

## Neovim

Neovim is a fork of Vim which has powerful plugins that adds IDE features. I use it to edit projects in the CLI.
Since configuring these plugins is complicated and breaks all the time (because Neovim is still in rapid development),
I use the [LazyVim](https://github.com/LazyVim/LazyVim) distribution to manage all of this for me.
And for anything else that I want, LazyVim makes it easy to add my own configuration and plugins.

Configuration files: [`.config/nvim`](https://github.com/patrick-5546/dotfiles/tree/main/dot_config/nvim)

## VS Code

VS Code has great support for debugging, remote development, Git, most programming languages, and much more through extensions.
Expand Down Expand Up @@ -91,7 +100,7 @@ Besides the settings.json file, you can add [launch configurations](https://code
These files are stored in the `.vscode/` directory. Workspace settings override user settings.

Example workspace settings: [UBCSailbot/docs/.vscode](https://github.com/UBCSailbot/docs/tree/main/.vscode),
[UBCSailbot/sailbot_workspace/.vscode](https://github.com/UBCSailbot/sailbot_workspace/tree/main/.vscode).
[UBCSailbot/sailbot_workspace/sailbot.code-workspace](https://github.com/UBCSailbot/sailbot_workspace/blob/main/sailbot.code-workspace).

#### Dev Container

Expand Down
Loading

0 comments on commit 9b629f3

Please sign in to comment.