Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #--Startup-Settings-------------------------------------------------------------
- bind "set completion-ignore-case on" #ignore case in tab-completion
- bind "set show-all-if-ambiguous On" #automatically show all tab complete options
- bind "set bell-style none"
- # rbenv
- export PATH=/usr/local/sbin:$PATH
- export PATH=$HOME/.rbenv/bin:$PATH
- if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
- #node & npm
- export PATH=$HOME/.node/bin:$PATH
- # app & command aliases
- alias n='nano'
- alias o='open'
- alias c='clear'
- alias l="ls -lsa"
- alias chrome='open -a "Google Chrome" '
- alias s='open -a "Sublime Text" '
- apatschi () {
- chrome "http://localhost:8000"
- python -m SimpleHTTPServer
- }
- mcd () { mkdir -p "$1" && cd "$1"; } # mcd: Moves a file to the MacOS trash
- ql () { qlmanage -p "$*" >& /dev/null; } # ql: Opens any file in MacOS Quicklook Preview
- zipf () { zip -r "$1".zip "$1" ; } # zipf: To create a ZIP archive of a folder
- # extract: 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
- }
- alias myip='curl ip.appspot.com' # myip: Public facing IP Address
- # ii: display useful host related informaton
- # -------------------------------------------------------------------
- ii() {
- echo -e "\nYou are logged on ${RED}$HOST"
- echo -e "\nAdditionnal information:$NC " ; uname -a
- echo -e "\n${RED}Users logged on:$NC " ; w -h
- echo -e "\n${RED}Current date :$NC " ; date
- echo -e "\n${RED}Machine stats :$NC " ; uptime
- echo -e "\n${RED}Current network location :$NC " ; scselect
- echo -e "\n${RED}Public facing IP Address :$NC " ;myip
- #echo -e "\n${RED}DNS Configuration:$NC " ; scutil --dns
- echo
- }
- alias editHosts='sudo edit /etc/hosts' # editHosts: Edit /etc/hosts file
- # lr: Full Recursive Directory Listing
- # ------------------------------------------
- alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'
- # cleanupDS: Recursively delete .DS_Store files
- # -------------------------------------------------------------------
- alias cleanupDS="find . -type f -name '*.DS_Store' -ls -delete"
- # colors
- export TERM=xterm-color
- export CLICOLOR=1
- export LSCOLORS=ExFxBxDxCxegedabagacad
- alias egrep='egrep -r -n --color=auto --exclude-dir=.svn --exclude-dir=.git'
- alias fgrep='fgrep -r -n --color=auto --exclude-dir=.svn --exclude-dir=.git'
- alias grep='grep -r -n --extended-regexp --color=auto --exclude-dir=.svn --exclude-dir=.git'
- alias less='less -r'
- alias ls='ls -alh -G'
- #git
- alias gittree='git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"'
- alias gin='cd ~/Sites/ginetta'
- alias sites='cd ~/Sites'
- #ifconfig only wlan
- alias ipw='ifconfig en0 inet'
- # cd to the path of the front Finder window
- cdf() {
- target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
- if [ "$target" != "" ]; then
- cd "$target"; pwd
- else
- echo 'No Finder window found' >&2
- fi
- }
- #locale
- export LC_CTYPE=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- #shell prompt
- export PS1='\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\n\$ '
- #export TERM="xterm-color"
- #PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
- #autocomplete
- #set completion-ignore-case on
- #set show-all-if-ambiguous on
- #TAB: menu-complete
- #git autocomplete
- if [ -f ~/.git-completion.bash ]; then
- . ~/.git-completion.bash
- fi
- #show archey on bootup
- archey -c
- #more recent versions of some OS X tools (http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac)
- #PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
- #say -v "Zarvox" "hello {$USER}, I'm a new terminal" &
- say -v "Zarvox" "new terminal" &
- # Setting PATH for Python 3.4
- # The orginal version is saved in .bash_profile.pysave
- PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
- export PATH
Add Comment
Please, Sign In to add comment