Skip to content

Instantly share code, notes, and snippets.

@dbrockman
Created May 13, 2014 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbrockman/7839a01ff6af94c8c7f7 to your computer and use it in GitHub Desktop.
Save dbrockman/7839a01ff6af94c8c7f7 to your computer and use it in GitHub Desktop.
### ALIAS
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias §='exit'
# Get week number
alias week='date +%V'
# Show/hide hidden files in Finder
alias showhiddenfinder="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias hidehiddenfinder="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# Faster npm for europeans
command -v npm > /dev/null && alias npme="npm --registry http://registry.npmjs.eu"
### Conflicted files in Dropbox
alias conflicted_dropbox='find ~/Dropbox/ -path "*(*''s conflicted copy [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*" -print'
### Fix duplicate "Open With" in Finder
alias fix_open_with='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment