-
Notifications
You must be signed in to change notification settings - Fork 2
/
_universal_macos
31 lines (25 loc) · 1.22 KB
/
_universal_macos
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
if [[ `uname` = "Darwin" ]]; then
export PATH="$PATH:/Users/`whoami`/dotfiles/bin"
export PATH="$PATH:/opt/bin"
export EDITOR="vim"
export HOMEBREW_NO_ANALYTICS=1
# Mac Directory Services
alias ldns="dscl localhost -list /Local/Default/Hosts"
function ldns_set() {
sudo dscl localhost -create /Local/Default/Hosts/$1 IPAddress 127.0.0.1
}
function ldns_delete() {
sudo dscl localhost -delete /Local/Default/Hosts/$1
}
# Mac Firefox Stuff
alias optff="cd ~/Library/Application\ Support/Firefox/Profiles/; for f in */*.sqlite; do sqlite3 \$f 'VACUUM;'; done; echo Firefox DBs Optimized;"
alias ffpm="/Applications/Firefox.app/Contents/MacOS/firefox-bin -ProfileManager"
# Cleanup the Open With Menu
alias cleanow="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user; killall Finder"
# The Fuck
alias fuck='$(thefuck $(fc -ln -1))'
alias FUCK='fuck'
alias flushdns='dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed'
# Insecure Chrome for testing XSS
alias ichrome='/Applications/Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir'
fi