Skip to content

Instantly share code, notes, and snippets.

@bouyagas
Created July 21, 2023 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bouyagas/ac4dba89f72fbe0dfff3bf12ad197a1c to your computer and use it in GitHub Desktop.
Save bouyagas/ac4dba89f72fbe0dfff3bf12ad197a1c to your computer and use it in GitHub Desktop.
alliases
# Aliases
# Tmux
alias tmux='tmux -2'
alias t='tmux attach || tmux new-session'
alias ta='tmux attach -t'
alias tn='tmux new-session'
alias tna='tmux -a -t'
alias tl='tmux ls'
alias tkt='tmux kill-session -t'
alias tks='tmux kill-server'
alias px='npx prettier --write .'
alias pc='npx prettier --check .'
# Nvim
alias n='nvim'
alias nn='nvim .'
# Quit
alias q='exit'
# Clear
alias c='clear'
alias top='vtop --theme=wizard'
# Amplify
alias a='amplify'
alias ai='amplify init'
alias aa='amplify add'
alias ad='amplify delete'
alias ast='amplify storage'
alias acf='amplify configure'
alias acg='amplify codegen'
alias as='amplify status'
alias acs='amplify console'
alias ar='amplify remove'
alias ap='amplify push'
alias al='amplify logout'
alias ah='amplify help'
alias au='amplify update'
alias af='amplify function'
alias am='amplify mock'
alias an='amplify notifications'
alias apub='amplify publish'
alias ab='amplify build'
# Quick edit
alias nb='nvim ~/.bashrc'
alias nbp='nvim ~/.bash_profile'
alias nv='nvim ~/.config/nvim/custom/init.lua'
alias nvp='nvim ~/.config/nvim/custom/plugins.lua'
alias nt=' nvim ~/.tmux.conf'
# python
alias pyenvs='python3 -m venv env'
alias pyenva='source env/bin/activate'
alias host_file='python3 -m http.server'
# pnpm commands
alias p='pnpm'
alias pa='p add'
alias pc='p create'
alias pi='p install'
alias pu='p update'
alias prm='p remove'
alias pr='p run'
alias pt='p test'
alias pl='p link'
alias ps='p start'
# node commands
alias ni='npm install'
alias nii='npm init'
alias nis='npm install -S'
alias nid='npm install -D'
alias nuds='npm update -S'
alias nudd='npm update -D'
alias no='npm outdated'
alias nl='npm ls --depth 0'
alias nus='npm uninstall -S'
alias nud='npm uninstall -D'
alias nt='npm test'
alias nit='npm install && npm test'
alias nk='npm link'
alias nr='npm run'
alias ns='npm start'
alias nf='npm cache clean && rm -rf node_modules && npm install'
alias nlg='npm list --global --depth=0'
alias nig='npm install --global'
alias nug='npm uninstall --global'
alias nug='npm update -g'
alias nog='npm outdated -g --depth=0'
alias npku='ncu --upgrade && ni'
# yarn commands
alias yi='yarn install'
alias yii='yarn init'
alias yas='yarn add'
alias yad='yarn add --dsev'
alias yr='yarn remove'
alias yug='yarn upgrade'
alias yl='yarn list --depth=0'
alias yod='yarn outdated'
alias yg='yarn global'
alias yru='yarn run'
alias yt='yarn test'
alias yof=
alias ygu='yarn global upgrade'
alias ypku='ncu --upgrade && yi'
# git commands
alias gi='git init'
alias ga='git add -A'
alias gc='git commit -m'
alias gp='git push'
alias gb='git branch'
alias gbd="git branch -d"
alias gco='git checkout'
alias gcob='git checkout -b'
alias gm='git merge'
alias gr='git reset'
alias gpum='git pull upstream master'
alias grv='git remote -v'
alias grro='git remote rm origin'
alias grao='git remote add origin'
alias grru='git remote rm upstream'
alias grau='git remote add upstream'
alias gcl='git clone'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gs='git status'
alias gd='git diff'
alias gsl='git shortlog'
alias gk='gitk --all&'
alias gx='gitx --all'
alias get='git'
# file commands
alias work='cd project_code'
alias key='ssh-add'
# docker commands
alias dkps="docker ps"
alias dkst="docker stats"
alias dkpsa="docker ps -a"
alias dkimgs="docker images"
alias dkcpup="docker-compose up -d"
alias dkcpdown="docker-compose down"
alias dkcpstart="docker-compose start"
alias dkcpstop="docker-compose stop"
# linux alias for pbcopy and pbpaste:
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
source /etc/profile.d/bash_completion.sh
. "$HOME/.cargo/env"
eval "$(starship init bash)"
export GOPATH=$HOME/go
source /etc/profile.d/bash_completion.sh
# pnpm
export PNPM_HOME="/home/mohamedbgassama/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment