-
Notifications
You must be signed in to change notification settings - Fork 1
/
macos
74 lines (59 loc) · 2.11 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/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 "Windows App"'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias ff='open -a "Firefox"'
alias safari='open -a Safari'
alias am='open -a "Activity Monitor"'
alias sql='open -a "Antares"'
alias x='cursor .'
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 }'"
alias speedtest="networkQuality -v"
# 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;"
# convert heic to jpg
function heic2jpg {
for i in *.{heic,HEIC}; do
j=${i%.heic}
k=${j%.HEIC}
echo "$k"
sips -s format jpeg "$i" --out "$k.jpg"
done
}
# 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"
export PATH="/opt/homebrew/bin:$PATH"
# no analytics
export HOMEBREW_NO_ANALYTICS=1
# no freacking updates
export HOMEBREW_NO_INSTALL_CLEANUP=1