-
Notifications
You must be signed in to change notification settings - Fork 1
/
macos
58 lines (45 loc) · 1.78 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# macOS
alias l='ls -lFh'
alias la='l -a'
alias ll='ls -lh'
alias grep='grep --color'
alias o='open -a Finder .'
alias s='open -a "Sublime Text" .'
alias doc='cd ~/Documents'
alias c='open -a "Google Chrome"'
alias cc='open -a "Google Chrome Canary"'
alias fz='open -a FileZilla'
alias ec='open -a "Microsoft Edge Canary"'
alias mstsc='open -a "Microsoft Remote Desktop Beta"'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias ff='open -a "Firefox"'
alias am='open -a "Activity Monitor"'
alias sql='open -a "Sequel Pro"'
alias x='code .'
alias qt='open -a "Quicktime Player"'
alias spotify='open -a Spotify'
alias ping='prettyping --nolegend'
alias dus='ncdu --color dark -rr -x --exclude .git --exclude node_modules'
alias flushdns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
alias checkupdates="softwareupdate -l"
alias installupdate="sudo softwareupdate -i"
alias installupdates="installupdate -a"
alias localip="ipconfig getifaddr en0"
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
# Lock the screen (when going AFK)
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# Fake the missing updatedb executable
alias updatedb="cd /; sudo /usr/libexec/locate.updatedb; cd - > /dev/null;"
# start/stop ubiquity controller
function _ub-ctl {
cd /Applications/UniFi.app/Contents/Resources;
/usr/local/Cellar/openjdk\@8/1.8.0+275/bin/java -jar /Applications/UniFi.app/Contents/Java/ace.jar $@ &
cd - >/dev/null;
}
alias ub-start="_ub-ctl start";
alias ub-stop="_ub-ctl stop";
# homebrew sbin
export PATH="/usr/local/sbin:$PATH"
# no analytics
export HOMEBREW_NO_ANALYTICS=1