From bfd5e61878f5b6f87907df90333c05215f4a69b1 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Wed, 28 Aug 2013 20:51:47 -0500 Subject: [PATCH] clean up aliases * remove aliases that I never use * add chromekill alias to kill chrome tabs to free up memory --- zsh/aliases.zsh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index a9c8cdb..9037302 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -20,9 +20,6 @@ alias ll="ls -lFh ${colorflag}" alias lld="ls -l | grep ^d" alias rmf="rm -rf" -# shortcut to dotfiles -alias dot="cd ~/.dotfiles" - # Helpers alias grep='grep --color=auto' alias df='df -h' # disk free, in Gigabytes, not bytes @@ -36,9 +33,6 @@ alias mou='open -a Mou.app' alias mark='open -a Marked.app' alias ios='open -a /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' -# be nice -alias please=sudo - # IP addresses alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias localip="ipconfig getifaddr en1" @@ -73,10 +67,6 @@ alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; rm -rfv ~/.Trash" alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" - -# PlistBuddy alias, because sometimes `defaults` just doesn’t cut it -alias plistbuddy="/usr/libexec/PlistBuddy" - # One of @janmoesen’s ProTip™s for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do alias "$method"="lwp-request -m '$method'" @@ -85,4 +75,7 @@ done # Stuff I never really use but cannot delete either because of http://xkcd.com/530/ alias stfu="osascript -e 'set volume output muted true'" alias pumpitup="osascript -e 'set volume 10'" -alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'" + +# Kill all the tabs in Chrome to free up memory +# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description +alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"