Last active
August 26, 2023 23:52
-
-
Save keegoid/3c24e18ca9f0a90d117ebbea7d6888df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias jdk='export JDK_HOME="$(brew --prefix openjdk)"; export JAVA_HOME="$JDK_HOME"; [[ ":$PATH:" =~ :$JAVA_HOME/bin: ]] || PATH="$JAVA_HOME/bin:$PATH"; brew unlink openjdk; brew link --overwrite openjdk' | |
alias jdk11='export JDK_HOME="$(brew --prefix openjdk@11)"; export JAVA_HOME="$JDK_HOME"; [[ ":$PATH:" =~ :$JAVA_HOME/bin: ]] || PATH="$JAVA_HOME/bin:$PATH"; brew unlink openjdk@11; brew link --overwrite openjdk@11' | |
alias cp="cp -i" # confirm operation | |
alias dc="docker-compose" # docker-compose is for starting an image, a DOCKERFILE is for creating an image | |
alias dcb="docker-compose run --rm --build" # build and run, remove when done | |
alias dcr="docker-compose run --rm" # run an image and remove when done | |
alias df="df -h" # list file system info in human readable format | |
alias dfsort="df | sort -gk5" # list file system info in order of use% | |
alias du="du -h" # list directory sizes in human readable format | |
alias dus="du -s" # list directory sizes in summary format | |
alias dusort="du --max-depth=1 | sort -h" # list directory sizes for top level | |
alias env37="source ~/env37/bin/activate" # activate python3.7 venv | |
alias env39="source ~/env39/bin/activate" # activate python3.9 venv | |
alias env310="source ~/env310/bin/activate" # activate python3.10 venv | |
alias ga="git add" # git add | |
alias gc="git commit" # git commit | |
alias gcn="git commit -m '$(date)'" # git commit with date as message | |
alias gcl="git config --list" # git config list | |
alias gd="git diff --staged" # git diff staged files before commit | |
alias gist="gist -c" # always copy resulting url to clipboard | |
alias gl="git log --graph --decorate --pretty=oneline --abbrev-commit" # git log | |
alias gpg="gpg2" # gpg2 | |
alias gs="git status" # git status | |
alias gu="git remote update" # git remote update | |
alias kctx="kubectx" # change K8s context | |
alias keegan="gpg2 --encrypt --sign --armor" # encrypt file with my public key | |
alias kns="kubens" # change K8s namespace | |
alias la="ls -d .*" # directories w/o contents, list hidden | |
alias ll="ls -l" # long list | |
alias lla="ls -ld .*" # directories w/o contents, long list hidden | |
alias ls="ls -h --group-directories-first --color=auto" # human readable, directories first, color | |
alias ln="ln -i" # confirm operation | |
alias meminfo="free -m -l -t" # list memory info | |
alias mkctl="microk8s kubectl" # microk8s | |
alias mkdir="mkdir -pv" # make directories and parents | |
alias mv="mv -i" # confirm operation | |
alias netinfo="lspci -k -nn | grep -A 3 -i net" # list network info | |
alias netinfo2="sudo lshw -C network" # list network info | |
alias netinfo3="modinfo iwlwifi" # list network info | |
alias netinfo4="dmesg | grep iwl" # list network info | |
alias nl="npm list --depth=0 2>/dev/null" # npm list local packages | |
alias nlg="npm list -g --depth=0 2>/dev/null" # npm list global packages | |
alias nr="newrelic" # newrlic-cli | |
alias nrdiag='nrdiag_x64' # use 64-bit version | |
alias osversion="cat /etc/*release*" # OS version | |
alias pbcopy="xclip -selection clipboard" # pbcopy | |
alias pbpaste="xclip -o" # pbpaste | |
alias ports="netstat -tulanp" # list open ports | |
alias rclone="rclone --progress --update --verbose" # rclone options | |
alias reboot="sudo /sbin/reboot" # reboot | |
alias rm="rm -I --preserve-root" # delete protection | |
alias rmdir="rmdir -pv" # remove empty directories and parents | |
alias shutdown="sudo /sbin/shutdown" # shutdown | |
alias sources="cat /etc/apt/sources.list" # print sources list | |
alias unkeegan="gpg2 --decrypt" # decrypt file with my private key | |
alias wget="wget -c" # resume downloads | |
alias xclip="xclip -sel clip" # use system clipboard in xclip | |
alias zb="z -b" # quickly cd to the parent directory | |
alias zf="z -I" # use fzf to select in multiple matches | |
alias zi="z -i" # cd with interactive selection | |
alias zz="z -c" # restrict matches to subdirs of $PWD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment