Skip to content

Instantly share code, notes, and snippets.

@Programazing
Last active February 17, 2024 23:28
Show Gist options
  • Save Programazing/837cb8db4c57f5c44039a1482606218d to your computer and use it in GitHub Desktop.
Save Programazing/837cb8db4c57f5c44039a1482606218d to your computer and use it in GitHub Desktop.
# Navigation
alias a='nano ~/.bash_aliases'
alias ae='gedit ~/.bash_aliases'
alias ..='cd ..'
alias ...='cd ../..'
alias todev='cd /media/programazing/Documents/Dev'
alias toproj='cd /media/programazing/Documents/Dev/personal/projects'
# cloneproj linkToGitRepo
# This will clone a git repo to the projects folder and then move you to that project in the console
cloneproj() {
toproj
git clone "$@"
cd $(echo "$@" | sed -e 's/.*\/\(.*\)\..*/\1/');
}
# Terminal
alias update='sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && flatpak update -y'
alias h='history 50'
alias theme='bash -c "$(wget -qO- https://git.io/vQgMr)"'
alias emacs='emacsclient -c -a 'emacs''
alias ls='ls -la'
alias t='tmux_wrapper() { tmux "$@"; }; tmux_wrapper'
# System
# Mount Documents partition
alias fixdocs='sudo rm -fr /media/programazing/Documents && sudo mkdir /media/programazing/Documents && sudo mount -t auto -v /dev/sda2 /media/programazing/Documents'
# Git
alias gs='git status'
alias gd='git diff'
alias gl='git log'
alias gc='git checkout'
alias gp='git push'
alias gpl='git pull'
dotcommit() {
read -p "Enter commit message: " commit_msg
git add .
git commit -m "$commit_msg"
}
# Other
alias ncal='xdg-open https://cal.new'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment