Skip to content

Instantly share code, notes, and snippets.

@fogrew
Last active September 15, 2017 00:40
Show Gist options
  • Select an option

  • Save fogrew/754bcbd965f9ba949e73d2df963a75ad to your computer and use it in GitHub Desktop.

Select an option

Save fogrew/754bcbd965f9ba949e73d2df963a75ad to your computer and use it in GitHub Desktop.
my .zshrc
# PATH
export PATH=$HOME/bin:/usr/local/bin:$PATH
# ZSH
ZSH_THEME="clean"
plugins=(git)
HIST_STAMPS="dd.mm.yyyy"
DISABLE_AUTO_UPDATE="true"
export ZSH="$HOME/.oh-my-zsh"
alias zshrc="subl ~/.zshrc"
alias ohmyzsh="subl $ZSH"
source "$HOME/.oh-my-zsh/oh-my-zsh.sh"
# Editors
export EDITOR='subl -w'
alias atom="open -a ~/Applications/Atom.app"
alias code="~/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Sites
alias hosts="subl /private/etc/hosts"
alias sites="subl /usr/local/etc/nginx/"
# Projects
alias projects="~/projects"
alias sitev6="$HOME/projects/wrike/site-v6"
# Git
alias got='git '
alias get='git '
alias gcl='git clone'
alias gpl='git pull'
alias go='git checkout '
alias gco='git checkout '
alias gcb='git checkout -b'
alias gs='git status '
alias gb='git branch'
alias ga='git add '
alias gc='git commit'
alias gcm='git commit -am '
alias gph='git push'
alias gpht='git push --tags'
alias gmr='git merge '
alias guncommit='git reset --soft $(git log --format=%H -2 | tail -1)'
alias gd='git --no-pager diff --color | diff-so-fancy'
alias gl='git log --decorate --graph --pretty=format:"%Cred%cn%Creset: %Cgreen%d%Creset %s %Cblue(%cr)" | less --line --pattern ".*(HEAD).*"'
# HTTP-Server
alias nginx.start='sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.stop='sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.restart='nginx.stop && nginx.start'
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php71.plist"
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php71.plist"
alias php-fpm.restart='php-fpm.stop && php-fpm.start'
alias mysql.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.restart='mysql.stop && mysql.start'
alias nginx.logs.error='tail -250f /usr/local/etc/nginx/logs/error.log'
alias nginx.logs.access='tail -250f /usr/local/etc/nginx/logs/access.log'
alias nginx.logs.default.access='tail -250f /usr/local/etc/nginx/logs/default.access.log'
alias nginx.logs.default-ssl.access='tail -250f /usr/local/etc/nginx/logs/default-ssl.access.log'
alias nginx.logs.phpmyadmin.error='tail -250f /usr/local/etc/nginx/logs/phpmyadmin.error.log'
alias nginx.logs.phpmyadmin.access='tail -250f /usr/local/etc/nginx/logs/phpmyadmin.access.log'
# SSH Connections
alias linp.alpha="ssh 192.168.3.26"
alias linp.rc="ssh 192.168.3.39"
alias linp.fogrew="ssh fogrew@fogrew.site"
# System utils
alias lh='ls -d .*' # show hidden files/directories only
alias ports='networksetup -listallhardwareports' # show hidden files/directories only
alias wifis='defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences | grep LastConnected -A 7' # show seven wi-fi saved aitports
alias ql='qlmanage -p 2>/dev/null' # OS X Quick Look
alias oo='open .' # open current directory in OS X Finder
alias 'today=calendar -A 0 -f /usr/share/calendar/calendar.mark | sort'
alias 'mailsize=du -hs ~/Library/mail'
alias 'smart=diskutil info disk0 | grep SMART' # display SMART status of hard drive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment