2022-12-01 20:53:42 -08:00
|
|
|
#!/usr/bin/env sh
|
2023-04-15 19:11:31 -07:00
|
|
|
# @file Aliases
|
2023-04-12 18:44:59 -07:00
|
|
|
# @brief Houses the aliases that are included by `~/.bashrc` and `~/.zshrc`
|
|
|
|
# @description
|
|
|
|
# This script is included by `~/.bashrc` and `~/.zshrc` to provide command aliases.
|
2022-12-01 20:53:42 -08:00
|
|
|
|
2022-11-22 09:26:04 -08:00
|
|
|
### macOS Polyfills
|
2022-12-06 11:20:47 -08:00
|
|
|
# Note: May cause conflicts
|
2023-08-08 00:06:49 -07:00
|
|
|
if [ -d /Applications ] && command -v brew > /dev/null; then
|
|
|
|
PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
|
|
|
|
PATH="$(brew --prefix)/opt/gnu-indent/libexec/gnubin:$PATH"
|
|
|
|
PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH"
|
|
|
|
PATH="$(brew --prefix)/opt/gnu-tar/libexec/gnubin:$PATH"
|
|
|
|
export PATH
|
2022-12-06 11:20:47 -08:00
|
|
|
fi
|
2022-11-22 09:26:04 -08:00
|
|
|
|
2022-12-06 11:20:47 -08:00
|
|
|
# Basic command aliases for verbosity / simplicity
|
|
|
|
alias cp='cp -v'
|
|
|
|
alias ln='ln -sriv'
|
|
|
|
alias mv='mv -vi'
|
|
|
|
alias rm='rm -vi'
|
|
|
|
|
|
|
|
### Colorize
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
alias diff='diff --color=auto'
|
2023-08-06 22:19:59 -07:00
|
|
|
# iproute2mac not working with this alias
|
|
|
|
# alias ip='ip --color=auto'
|
2022-12-06 11:20:47 -08:00
|
|
|
alias pacman='pacman --color=auto'
|
|
|
|
|
|
|
|
### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances)
|
2023-01-12 04:27:23 -08:00
|
|
|
if command -v glances > /dev/null; then
|
|
|
|
alias top='glances'
|
|
|
|
elif command -v htop > /dev/null; then
|
|
|
|
alias top='bashtop'
|
|
|
|
fi
|
2022-12-06 11:20:47 -08:00
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
### bat
|
|
|
|
if command -v bat > /dev/null; then
|
|
|
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
2023-08-08 00:06:49 -07:00
|
|
|
alias bat-help='bat --plain --language=help'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
alias cat='bat -pp'
|
|
|
|
alias less='bat --paging=always'
|
|
|
|
help() {
|
|
|
|
"$@" --help 2>&1 | bathelp
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
2023-08-08 21:54:49 -07:00
|
|
|
### curl-impersonate
|
|
|
|
# https://github.com/lwthiker/curl-impersonate
|
|
|
|
alias curl-impersonate='docker run --rm lwthiker/curl-impersonate:0.5-chrome curl_chrome110'
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
### curlie
|
2023-12-07 18:06:19 -08:00
|
|
|
### Curlie handles compression differently than curl. The bootstrap script
|
|
|
|
# invoked by `bash <(curl -sSL https://install.doctor/start)` also requires
|
|
|
|
# the `--compressed` flag when this alias is enabled.
|
|
|
|
# if command -v curlie > /dev/null; then
|
|
|
|
# alias curl='curlie'
|
|
|
|
# fi
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
### exa
|
|
|
|
if command -v exa > /dev/null; then
|
|
|
|
alias ls='exa --long --all --color auto --icons --sort=type'
|
|
|
|
alias tree='exa --tree'
|
|
|
|
alias la='ls -la'
|
|
|
|
alias lt='ls --tree --level=2'
|
2022-12-01 20:39:49 -08:00
|
|
|
else
|
|
|
|
# Show full output when using ls
|
|
|
|
alias ls='ls -AlhF --color=auto'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
### gping
|
|
|
|
# Replacement for ping that includes graph
|
|
|
|
if command -v gping > /dev/null; then
|
|
|
|
alias ping='gping'
|
|
|
|
fi
|
|
|
|
|
2023-08-26 04:45:14 -07:00
|
|
|
### safe-rm
|
2023-11-05 19:50:23 -08:00
|
|
|
# TODO: Integrate this so it fails gracefully if folder does not exist (i.e. safe-rm -rf ~/Crunch should not return an error)
|
|
|
|
# if command -v safe-rm > /dev/null; then
|
|
|
|
# alias rm='safe-rm'
|
|
|
|
# fi
|
2023-08-26 04:45:14 -07:00
|
|
|
|
2023-01-12 04:27:23 -08:00
|
|
|
### VIM
|
|
|
|
if command -v vim > /dev/null; then
|
2023-07-31 23:50:08 -07:00
|
|
|
alias vi="vim"
|
|
|
|
alias v="vim"
|
2023-01-12 04:27:23 -08:00
|
|
|
fi
|
2023-08-01 20:53:53 -07:00
|
|
|
|
2023-05-06 18:39:55 -07:00
|
|
|
### NVIM
|
|
|
|
if command -v nvim > /dev/null; then
|
2023-07-31 23:50:08 -07:00
|
|
|
alias nvim='env -u VIMINIT -u MYVIMRC nvim'
|
2023-05-06 18:39:55 -07:00
|
|
|
fi
|
2022-12-06 08:43:41 -08:00
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
### mitmproxy / mitmweb
|
|
|
|
if command -v mitmproxy > /dev/null; then
|
2023-08-08 00:06:49 -07:00
|
|
|
alias mitmproxy='mitmproxy --set confdir=${XDG_CONFIG_HOME:-$HOME/.config}/mitmproxy'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
fi
|
|
|
|
if command -v mitmweb > /dev/null; then
|
2023-08-08 00:06:49 -07:00
|
|
|
alias mitmweb='mitmweb --set confdir=${XDG_CONFIG_HOME:-$HOME/.config}/mitmproxy'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
### ripgrep
|
2023-08-08 00:06:49 -07:00
|
|
|
if command -v rg > /dev/null; then
|
2023-01-03 19:14:29 -08:00
|
|
|
alias rgrep='rg --color=auto'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
fi
|
|
|
|
|
2023-01-12 04:27:23 -08:00
|
|
|
### xclip
|
|
|
|
alias xclip='xclip -selection c'
|
|
|
|
|
2023-01-30 22:57:43 -08:00
|
|
|
### Zola
|
|
|
|
if command -v org.getzola.zola > /dev/null; then
|
|
|
|
alias zola="flatpak run org.getzola.zola"
|
|
|
|
fi
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
# Fix for auto expansion (source: https://wiki.archlinux.org/title/Sudo#Passing_aliases)
|
|
|
|
alias sudo='sudo '
|
|
|
|
|
|
|
|
# Reload current shell
|
2023-08-08 00:06:49 -07:00
|
|
|
alias reload='exec ${SHELL} -l'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Create an Authelia password hash
|
2022-12-01 23:00:10 -08:00
|
|
|
alias authelia-password='docker run authelia/authelia:latest authelia hash-password'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Shows IP addresses that are currently banned by fail2ban
|
|
|
|
alias banned='sudo zgrep "Ban" /var/log/fail2ban.log*'
|
|
|
|
|
|
|
|
alias connections='nm-connection-editor'
|
|
|
|
|
|
|
|
# Command-line DNS utility
|
2022-12-06 08:43:41 -08:00
|
|
|
if ! command -v dog > /dev/null; then
|
|
|
|
alias dog="docker run -it --rm dog"
|
|
|
|
fi
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Download a file
|
|
|
|
alias download='curl --continue-at - --location --progress-bar --remote-name --remote-time'
|
|
|
|
|
|
|
|
# Download a website
|
2022-12-01 23:00:10 -08:00
|
|
|
alias download-site='wget --mirror -p --convert-links -P'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Flush DNS
|
2022-12-01 23:00:10 -08:00
|
|
|
alias flush-dns='sudo systemd-resolve --flush-caches && sudo systemd-resolve --statistics'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# FontBook for macOS
|
|
|
|
alias fontbook="open -b com.apple.FontBook"
|
|
|
|
|
|
|
|
# Get the possible GRUB resolutions
|
2022-12-01 23:00:10 -08:00
|
|
|
alias grub-resolutions='sudo hwinfo --framebuffer'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Execute git command with sudo priviledges while retaining .gitconfig
|
|
|
|
alias gsudo='sudo git -c "include.path="${XDG_CONFIG_DIR:-$HOME/.config}/git/config\" -c \"include.path=$HOME/.gitconfig\"'
|
|
|
|
|
|
|
|
# Create hashed password for Ansible user creation
|
2022-12-01 23:00:10 -08:00
|
|
|
alias hash-password='mkpasswd --method=sha-512'
|
|
|
|
|
2023-12-08 21:55:54 -08:00
|
|
|
# History alias
|
|
|
|
alias hh=hstr
|
|
|
|
|
2022-12-01 23:00:10 -08:00
|
|
|
# Show IP address
|
|
|
|
alias ip-address='curl http://ipecho.net/plain; echo'
|
|
|
|
|
2023-07-10 00:11:47 -07:00
|
|
|
# Configures Java to use ~/.config/java
|
|
|
|
alias java='java -Djava.util.prefs.userRoot="${XDG_CONFIG_HOME:-$HOME/.config}/java"'
|
|
|
|
|
2022-12-01 23:00:10 -08:00
|
|
|
# Shows local IP addresses
|
|
|
|
alias local-ip-address="ifconfig | grep -Eo 'inet (addr:|adr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Create parent directories automatically
|
|
|
|
alias mkdir='mkdir -pv'
|
|
|
|
|
|
|
|
# Make mount command output readable
|
|
|
|
alias mount='mount | column -t'
|
|
|
|
|
|
|
|
# Link pip to pip3
|
Update dotfiles/.local/share/chezmoi/home/private_dot_config/environments/terminal, dotfiles/.local/software/development/Brewfile, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/development, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/desktop, dotfiles/.local/software/desktop/Brewfile, dotfiles/.local/software/desktop/Packages.config, dotfiles/.local/software/desktop/Wingetfile, dotfiles/.local/software/development/Packages.config, dotfiles/.local/software/development/Scoopfile, dotfiles/.local/software/terminal/Brewfile, dotfiles/.local/software/terminal/Packages.config, dotfiles/.local/software/terminal/Scoopfile, dotfiles/.local/software/Gasfile.yml, dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/system/etc/timeshift/timeshift.json, dotfiles/.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl, dotfiles/.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports.tmpl, dotfiles/.local/share/chezmoi/system/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/roles/run_onchange_after_symlink-ansible-roles, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qscp, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl
Deleted dotfiles/.local/share/chezmoi/home/private_dot_config/environments/work
2022-11-27 06:59:13 -08:00
|
|
|
if ! command -v pip > /dev/null; then
|
|
|
|
alias pip='pip3'
|
|
|
|
fi
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
2023-06-03 22:45:26 -07:00
|
|
|
# Link python to python3
|
|
|
|
if [ -f /usr/bin/python3 ]; then
|
|
|
|
alias python='/usr/bin/python3'
|
|
|
|
elif [ -f /usr/local/bin/python3 ]; then
|
|
|
|
alias python='/usr/local/bin/python3'
|
|
|
|
fi
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/dot_local/Taskfile-local.yml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/home/.chezmoiremove, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_load-secrets, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/software.yml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml
Deleted dotfiles/.local/share/chezmoi/home/symlink_Taskfile.yml, dotfiles/.local/share/chezmoi/home/dot_local/symlink_Taskfile-upstream.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_bash_profile
2022-11-27 17:11:00 -08:00
|
|
|
# Masked sudo password entry
|
|
|
|
if command -v gum > /dev/null; then
|
|
|
|
alias please="gum input --password | sudo -nS"
|
|
|
|
fi
|
|
|
|
|
2022-12-01 21:51:43 -08:00
|
|
|
# Convert macOS plist to XML (for source control)
|
2022-12-01 23:00:10 -08:00
|
|
|
alias plist-xml='plutil -convert xml1'
|
2022-12-01 21:51:43 -08:00
|
|
|
|
2023-01-04 22:02:52 -08:00
|
|
|
# Recoverpy
|
|
|
|
alias recoverpy='python3 -m recoverpy'
|
|
|
|
|
2023-08-06 22:19:59 -07:00
|
|
|
# Performance Test
|
|
|
|
alias perftest='mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/perftest" && curl -sL yabs.sh | bash -s -- -w "${XDG_DATA_HOME:-$HOME/.local/share}/perftest/$(date +%Y%m%d_%H%M%S)"'
|
|
|
|
|
2023-11-29 17:41:39 -08:00
|
|
|
# @description Adds an alias to use Docker to run [pfFocus](https://github.com/TKCERT/pfFocus) which is a Python package that
|
|
|
|
# allows you to convert a pfSense export into a readable markdown file.
|
|
|
|
# @example
|
|
|
|
# pf-format < input.xml > output.md
|
|
|
|
function pf-format() {
|
|
|
|
docker run --rm -i ghcr.io/tkcert/pffocus "$*"
|
|
|
|
}
|
|
|
|
|
2023-12-06 18:18:45 -08:00
|
|
|
# Output plist in readable format
|
|
|
|
alias plcat='plutil -convert xml1 -o -'
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
# Show open ports
|
|
|
|
alias ports='sudo netstat -tulanp'
|
|
|
|
|
|
|
|
# Shuts down the computer, skipping the shutdown scripts
|
|
|
|
alias poweroff='sudo /sbin/poweroff'
|
|
|
|
|
|
|
|
# Open the Rclone web GUI
|
2022-12-01 23:00:10 -08:00
|
|
|
alias rclone-gui='rclone rcd --rc-web-gui --rc-user=admin --rc-pass=pass --rc-serve'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Reboot the computer
|
|
|
|
alias reboot='sudo /sbin/reboot'
|
|
|
|
|
|
|
|
# Launch the Python Simple HTTP Server
|
|
|
|
alias serve='python -m SimpleHTTPServer'
|
|
|
|
|
|
|
|
# Generate a SHA1 digest
|
|
|
|
alias sha1='openssl sha1'
|
|
|
|
|
2022-12-01 23:00:10 -08:00
|
|
|
# Generate SHA256 digest
|
|
|
|
alias sha256='openssl sha256'
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
# Shutdown the computer
|
|
|
|
alias shutdown='sudo /sbin/shutdown'
|
|
|
|
|
|
|
|
# Speed test
|
|
|
|
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip'
|
|
|
|
|
|
|
|
# Shortcut for config file
|
2022-12-01 23:00:10 -08:00
|
|
|
alias ssh-config='${EDITOR:code} ~/.ssh/config'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Pastebin
|
|
|
|
alias sprunge='curl -F "sprunge=<-" http://sprunge.us'
|
|
|
|
|
|
|
|
# Disable Tor for current shell
|
|
|
|
alias toroff='source torsocks off'
|
|
|
|
|
|
|
|
# Enable Tor for current shell
|
|
|
|
alias toron='source torsocks on'
|
|
|
|
|
|
|
|
# Test Tor connection
|
|
|
|
alias tortest='curl --socks5-hostname 127.0.0.1:9050 --silent https://check.torproject.org/ | head -25'
|
|
|
|
|
|
|
|
# Unban IP address (e.g. unban 10.14.24.14)
|
|
|
|
alias unban='sudo fail2ban-client set sshd unbanip'
|
|
|
|
|
|
|
|
# Recursively encrypts files using Ansible Vault
|
2022-12-01 23:00:10 -08:00
|
|
|
alias unvault-dir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault decrypt'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Alias for updating software
|
2022-12-06 11:20:47 -08:00
|
|
|
if command -v sysget > /dev/null; then
|
|
|
|
alias upgrade='sudo sysget update && sudo sysget upgrade'
|
|
|
|
else
|
|
|
|
# TODO - Add other package managers
|
|
|
|
if command -v apt-get > /dev/null; then
|
|
|
|
alias upgrade='sudo apt-get update && sudo apt-get upgrade'
|
|
|
|
fi
|
|
|
|
fi
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Recursively encrypts files using Ansible Vault
|
2022-12-01 23:00:10 -08:00
|
|
|
alias vault-dir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault encrypt'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
2023-06-10 22:44:34 -07:00
|
|
|
# Reverse engineer Dockerfiles from containers
|
|
|
|
alias whaler="docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock:ro pegleg/whaler"
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
# Shows nice looking report of weather
|
2023-06-18 23:25:39 -07:00
|
|
|
if command -v wego > /dev/null; then
|
|
|
|
alias weather='wego'
|
|
|
|
else
|
|
|
|
alias weather='curl -A curl wttr.in'
|
|
|
|
fi
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Change .wget-hsts file location
|
2023-01-12 03:40:58 -08:00
|
|
|
alias wget="wget --hsts-file ~/.local/wget-hsts"
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
### Yarn
|
2023-08-07 22:29:21 -07:00
|
|
|
alias yarn='yarn --use-yarnrc "${XDG_CONFIG_HOME:-$HOME/.config}/yarn/config"'
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
|
|
|
|
# Running this will update GPG to point to the current YubiKey
|
2022-12-01 20:39:49 -08:00
|
|
|
alias yubi-stub='gpg-connect-agent "scd serialno" "learn --force" /bye'
|
2023-08-06 22:19:59 -07:00
|
|
|
|
|
|
|
### cd aliases
|
|
|
|
|
2023-08-08 16:43:50 -07:00
|
|
|
alias Applications='cd $HOME/Applications'
|
|
|
|
alias Cloud='cd $HOME/Cloud'
|
|
|
|
alias Config='cd $HOME/.config'
|
|
|
|
alias Desktop='cd $HOME/Desktop'
|
|
|
|
alias Downloads='cd $HOME/Downloads'
|
|
|
|
alias Library='cd $HOME/Library'
|
|
|
|
alias Local='cd $HOME/.local'
|
|
|
|
alias Movies='cd $HOME/Movies'
|
|
|
|
alias Music='cd $HOME/Music'
|
|
|
|
alias Pictures='cd $HOME/Pictures'
|
|
|
|
alias Public='cd $HOME/Public'
|