-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
39 lines (28 loc) · 2.06 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# vim: set filetype=sh :
# Shortcuts
alias d="cd ~/Documents/Dropbox"
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/projects"
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; gem update'
# Flush Directory Service cache
alias flush="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
# 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"
# Alias for colorssh
alias cs="${HOME}/bin/colorssh"
# APG alias for friendly passwords
alias apgf='apg -a 0 -n 10 -m 10 -t -E lI10O -M NCSL'
# Use the vim that comes with homebrew
alias vi="/usr/local/bin/vim"
# Run the ansible playbook that puts all the dotfiles in place locally
alias dflocal='ANSIBLE_CONFIG=~/projects/osx-bootstrapping/ansible.cfg ansible-playbook --vault-password-file ~/projects/osx-bootstrapping/vault_from_gpg_agent.py -i ~/projects/osx-bootstrapping/dotfiles/inventory ~/projects/osx-bootstrapping/dotfiles/osx.yml | ~/projects/osx-bootstrapping/sanitize_output.awk'
# Run the ansible playbook that install all osx apps w/settings (locally)
alias dfosx="ANSIBLE_CONFIG=~/projects/osx-bootstrapping/ansible.cfg ansible-playbook --vault-password-file ~/projects/osx-bootstrapping/vault_from_gpg_agent.py -i ~/projects/osx-bootstrapping/osx_apps/inventory ~/projects/osx-bootstrapping/osx_apps/osx.yml --extra-vars 'computername=${HOSTNAME}' --limit '${HOSTNAME}'"