Created
October 20, 2016 18:20
-
-
Save AntonisFK/6ac5aa93e8e4492ffcec5c0331627c70 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
# Set Paths | |
#----------------------------------------------------------- | |
export PATH="/usr/local/bin:$PATH" | |
export PATH="$HOME/bin:$PATH" | |
# Define system proxy connections to remote resources (predix) | |
#------------------------------------------------------------- | |
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
#---------------------------------------------------------- | |
# color scheme | |
PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\] \w\[\033[00m\]:' | |
#----------------------------------------------------------- | |
#SET ITERM COLORS | |
#--------------------------- | |
export CLICOLOR=1 # Set CLICOLOR if you want Ansi Colors in iTerm2 1 | |
export TERM=xterm-256color # Set colors to match iTerm2 Terminal Colors | |
# ------------------------------ | |
# MAKE TERMINAL BETTER | |
#-------------------------------- | |
alias c="clear" | |
alias ~="cd ~" | |
alias cd..="cd ../" | |
alias ..="cd ../" | |
alias ...="cd ../../" | |
alias .3="cd ../../../" | |
alias .4="cd ../../../../" | |
alias .5="cd ../../../../../" | |
alias .6="cd ../../../../../../" | |
alias javascript="cd ~/Desktop/coding/javascript" | |
alias coding="cd ~/Desktop/coding" | |
mkcdir () { mkdir -p "$1" && cd "$1"; } | |
trash () { command mv "$@" ~/.Trash ; } | |
#---------------------------- | |
#Applications | |
#---------------------------- | |
alias chrome="open -a Google\ Chrome" | |
alias music="open -a Spotify" | |
alias reddit="url www.reddit.com" | |
alias f="open -a Finder ./" | |
#-------------------------- | |
# URL | |
#------------------------- | |
url() { | |
chrome "http://$*" | |
} | |
#------------------------ | |
# GOOGLE IT, BRO | |
#------------------------ | |
google() { | |
open "https://google.com/search?q=$*" | |
} | |
#-------------------------- | |
#EXTRACT | |
#------------------------ | |
zip() { zip -r "$1".zip "$1" ; } # zip a file | |
#Extract most know archives with one command | |
#--------------------------------------------------------- | |
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar e $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; | |
*.tbz2) tar xjf $1 ;; | |
*.tgz) tar xzf $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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment