Skip to content

Instantly share code, notes, and snippets.

@shredthaGNAR
Forked from CyberPunkCodes/aliases.zsh
Created September 4, 2022 00:13
Show Gist options
  • Select an option

  • Save shredthaGNAR/e3074771133806215dd39650566c8aea to your computer and use it in GitHub Desktop.

Select an option

Save shredthaGNAR/e3074771133806215dd39650566c8aea to your computer and use it in GitHub Desktop.
Oh-My-Zsh - Best and Most Helpful - My Custom ZSH Aliases - Tips Hack Help Info Doc Tutorial
# Source Reload
alias reload.zsh="source ~/.zshrc"
alias reload.profile="source ~/.bash_profile"
alias reload.term="source ~/.bash_profile && source ~/.zshrc"
# cd
alias ..="cd .."
# ls
alias ll="ls -AlhG"
#alias cll="/usr/local/bin/cll `pwd`"
# tar
alias tarr="tar -pczf $1 $2"
alias untarr="tar -pxzf $1"
alias starr="sudo tar -pczf $1 $2"
# Paths
alias go.webroot="/Applications/XAMPP/xamppfiles/htdocs"
alias go.sites="~/Sites"
# Mac
alias mac.showhidden="defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder"
alias mac.hidehidden="defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder"
# Docker
alias docker.cleancontainer="docker ps -a -q | xargs docker rm"
alias docker.cleanimage="docker images --filter dangling=true -q | xargs docker rmi"
# Find & Delete all ".DS_Store" files (recursive)
alias delete.ds="find . -name '.DS_Store' -type f -print -delete"
# Functions - My perfected ls command!
cll() { ls -AlhG "$@" | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(" %0o ",k);print}' | cut -c 1-5,21-; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment