From 3d64acff7267491ba35eb47d02219b04a632b767 Mon Sep 17 00:00:00 2001 From: Mia Steinkirch Date: Thu, 20 Jun 2019 15:50:49 -0700 Subject: [PATCH] add new profile --- configs/profile | 153 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 configs/profile diff --git a/configs/profile b/configs/profile new file mode 100644 index 0000000..ef5f64d --- /dev/null +++ b/configs/profile @@ -0,0 +1,153 @@ +###################################################### +# PRETTY STUFF +###################################################### + +# Normal Colors +Black='\e[0;30m' # Black +Red='\e[0;31m' # Red +Green='\e[0;32m' # Green +Yellow='\e[0;33m' # Yellow +Blue='\e[0;34m' # Blue +Purple='\e[0;35m' # Purple +Cyan='\e[0;36m' # Cyan +White='\e[0;37m' # White + +# Bold +BBlack='\e[1;30m' # Black +BRed='\e[1;31m' # Red +BGreen='\e[1;32m' # Green +BYellow='\e[1;33m' # Yellow +BBlue='\e[1;34m' # Blue +BPurple='\e[1;35m' # Purple +BCyan='\e[1;36m' # Cyan +BWhite='\e[1;37m' # White + +# Background +On_Black='\e[40m' # Black +On_Red='\e[41m' # Red +On_Green='\e[42m' # Green +On_Yellow='\e[43m' # Yellow +On_Blue='\e[44m' # Blue +On_Purple='\e[45m' # Purple +On_Cyan='\e[46m' # Cyan +On_White='\e[47m' # White + +NC="\e[m" # Color Reset + + +# \a an ASCII bell character (07) +# \d the date in "Weekday Month Date" format (e.g., "Tue May 26") +# \] end a sequence of non-printing characters +# \e an ASCII escape character (033) +# \h the hostname up to the first `.' +# \H the hostname +# \j the number of jobs currently managed by the shell +# \l the basename of the shell's terminal device name +# \n newline +# \r carriage return +# \s the name of the shell, the basename of $0 (the portion following the final slash) +# \t the current time in 24-hour HH:MM:SS format +# \T the current time in 12-hour HH:MM:SS format +# \@ the current time in 12-hour am/pm format +# \A the current time in 24-hour HH:MM format +# \u the username of the current user +# \v the version of bash (e.g., 2.00) +# \V the release of bash, version + patchelvel (e.g., 2.00.0) +# \w the current working directory +# \W the basename of the current working directory +# \! the history number of this command +# \# the command number of this command +# \$ if the effective UID is 0, a #, otherwise a $ +# \nnn the character corresponding to the octal number nnn +# \\ a backslash +# \[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt + + +PS1='\[\e[1;32m\]\d \T> \[\e[1;35m\]\h> \[\e[1;34m\] \w: \[\e[m\]' + + +###################################################### +# PERSONAL ALIASES +###################################################### + +alias home='cd ~' +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' +alias mkdir='mkdir -p' +alias h='history' +alias j='jobs -l' +alias which='type -a' +alias ..='cd ..' +alias jup="jupyter notebook" + +# Pretty-print of some PATH variables: +alias path='echo -e ${PATH//:/\\n}' +alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}' + +alias du='du -kh' # Makes a more readable output. +alias df='df -kTh' +alias dc="docker-compose" +alias dcrun="docker-compose run --rm" + + +###################################################### +# EXPORT OPTIONS +###################################################### + +export GREP_OPTIONS='--color=auto' +export GREP_COLOR='1;31' # green for matches +export CLICOLOR=230 +export HISTFILESIZE=3000 +export HISTCONTROL=ignoredups + + +###################################################### +# FUNCTIONS +###################################################### + +function extract() # Handy Extract Program +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xvjf $1 ;; + *.tar.gz) tar xvzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xvf $1 ;; + *.tbz2) tar xvjf $1 ;; + *.tgz) tar xvzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via >extract<" ;; + esac + else + echo "'$1' is not a valid file!" + fi +} + +# Function to run upon exit of shell. +function _exit() +{ + echo -e "${BRed}Hasta la vista, Baby! ${NC}" +} +trap _exit EXIT + + +# Creates an archive (*.tar.gz) from given directory. +function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } + +# Create a ZIP archive of a file or folder. +function makezip() { zip -r "${1%%/}.zip" "$1" ; } + +# Make your directories and files access rights sane. +function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;} +export PATH="/usr/local/opt/openssl/bin:$PATH" + +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/miavonsteinkirch/Desktop/google-cloud-sdk/path.bash.inc' ]; then . '/Users/miavonsteinkirch/Desktop/google-cloud-sdk/path.bash.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/miavonsteinkirch/Desktop/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/miavonsteinkirch/Desktop/google-cloud-sdk/completion.bash.inc'; fi