# Dot Files
## `~/.bashrc`
Accustomed shell customizations.
```
alias ll='ls -l'
alias la='ls -Al'
function kill_vscode() {
ps ux | grep -i '[v]scode' | awk '{ print $2 }' | xargs -r kill -s sigterm
}
```
## `~/.gitconfig`
Accustomed git configuration.
```
[core]
autocrlf = input
editor = vim --nofork
[credential "helperselector"]
selected = manager-core
[merge]
ff = false
[pull]
ff = only
[user]
email = REDACTED
name = Stargazer Wang
```
## `~/.ssh/config`
Accustomed SSH configuration.
* Share multiple SSH sessions over a single connection (i.e., SSH multiplexing).
* Fix login slowness on some misconfigured SSH servers by disabling GSSAPI (Kerberos) on client side.
* Keep SSH sessions alive from client side. Avoid being kicked from servers.
```
Host *
ControlMaster auto
ControlPath ~/.ssh/socket/%C.socket
ControlPersist 600
GSSAPIAuthentication no
ServerAliveCountMax 5
ServerAliveInterval 60
```
## `~/.ssh/id_*`
Generate SSH keys.
```
ssh-keygen -t ed25519 -C "Stargazer Wang from $(hostname -s)"
ssh-keygen -t rsa -b 4096 -C "Stargazer Wang from $(hostname -s)"
```
## `%SYSTEMROOT%/wsl-ssh.cmd`
Native Windows versions of OpenSSH are crap. Use the one in WSL 2 instead.
```
wsl.exe ssh %*
```
## `%USERPROFILE%/.wslconfig`
Limit CPU and memory usage of WSL 2.
```
[wsl2]
memory=16GB
processors=4
swap=0
```
## VS Code Extensions
Accustomed VS Code extensions.
* Bookmarks
* CMake Tools
* Container Tools
* GitHub Actions
* GitHub Copilot
* Makefile Tools
* Markdown All in One
* Markdown Preview Enhanced
* Markdown Preview Mermaid Support
* markdownlint
* Modern Fortran
* Python
* Remote Development
* Sort Lines
* YAML
## VS Code Settings
Accustomed VS Code settings.
* `keybindings.json`
```json
[
{
"key": "ctrl+f7",
"command": "workbench.action.compareEditor.nextChange",
"when": "textCompareEditorVisible"
},
{
"key": "alt+f5",
"command": "-workbench.action.compareEditor.nextChange",
"when": "textCompareEditorVisible"
},
{
"key": "ctrl+f7",
"command": "workbench.action.editor.nextChange",
"when": "editorTextFocus && !textCompareEditorActive"
},
{
"key": "alt+f5",
"command": "-workbench.action.editor.nextChange",
"when": "editorTextFocus && !textCompareEditorActive"
},
{
"key": "ctrl+shift+f7",
"command": "workbench.action.compareEditor.previousChange",
"when": "textCompareEditorVisible"
},
{
"key": "shift+alt+f5",
"command": "-workbench.action.compareEditor.previousChange",
"when": "textCompareEditorVisible"
},
{
"key": "ctrl+shift+f7",
"command": "workbench.action.editor.previousChange",
"when": "editorTextFocus && !textCompareEditorActive"
},
{
"key": "shift+alt+f5",
"command": "-workbench.action.editor.previousChange",
"when": "editorTextFocus && !textCompareEditorActive"
}
]
```
* `settings.json`
```json
{
"cmake.ignoreCMakeListsMissing": true,
"editor.fontSize": 20,
"editor.insertSpaces": true,
"editor.renderControlCharacters": true,
"editor.renderWhitespace": "all",
"editor.rulers": [132],
"editor.tabSize": 4,
"extensions.verifySignature": false,
"fortran.fortls.directories": [
"./**"
],
"fortran.fortls.disableDiagnostics": true,
"fortran.fortls.maxCommentLineLength": 132,
"fortran.fortls.maxLineLength": 132,
"fortran.fortls.notifyInit": true,
"fortran.fortls.nthreads": 1,
"fortran.fortls.preprocessor.directories": [
"./**"
],
"fortran.linter.compiler": "gfortran",
"fortran.linter.compilerPath": "mpifort",
"fortran.linter.extraArgs": [
"-std=f2018",
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wcharacter-truncation",
"-Wconversion-extra",
"-Wimplicit-procedure",
"-Wrealloc-lhs",
"-Wuse-without-only"
],
"fortran.linter.includePaths": [
"${fileDirname}"
],
"fortran.linter.modOutput": "${env:HOME}/fortran-linter-temporary",
"github.copilot.enable": {
"*": true,
"plaintext": true
},
"github.copilot.nextEditSuggestions.enabled": true,
"markdown.extension.math.enabled": false,
"python.analysis.typeCheckingMode": "strict",
"remote.SSH.path": "C:\\Windows\\wsl-ssh.cmd",
"remote.SSH.remotePlatform": {},
"remote.SSH.remoteServerListenOnSocket": true,
"remote.SSH.showLoginTerminal": true,
"security.workspace.trust.enabled": false,
"terminal.integrated.fontSize": 20,
"terminal.integrated.suggest.enabled": false,
"update.mode": "none",
"workbench.startupEditor": "none"
}
```