-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
74 lines (59 loc) · 3.5 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
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
74
# ---------------------------
# 1. SEARCHING
# ---------------------------
alias ff="find . -name " # Quickly search for file
alias locateUpdate='sudo /usr/libexec/locate.updatedb'
# ---------------------------
# 2. NETWORKING
# ---------------------------
alias myip='curl ip.appspot.com' # Public facing IP Address
alias netCons='lsof -i' # Show all open TCP/IP sockets
alias flushDNS='dscacheutil -flushcache' # Flush out the DNS Cache
alias lsock='sudo /usr/sbin/lsof -i -P' # Display open sockets
alias lsockU='sudo /usr/sbin/lsof -nP | grep UDP' # Display only open UDP sockets
alias lsockT='sudo /usr/sbin/lsof -nP | grep TCP' # Display only open TCP sockets
alias ipInfo0='ipconfig getpacket en0' # Get info on connections for en0
alias ipInfo1='ipconfig getpacket en1' # Get info on connections for en1
alias openPorts='sudo lsof -i | grep LISTEN' # All listening connections
alias showBlocked='sudo ipfw list' # All ipfw rules inc/ blocked IPs
# ---------------------------------------
# 2. SYSTEMS OPERATIONS & INFORMATION
# ---------------------------------------
# cleanupDS: Recursively delete .DS_Store files
# -------------------------------------------------------------------
alias cleanupDS="find . -type f -name '*.DS_Store' -ls -delete"
# finderShowHidden: Show hidden files in Finder
# finderHideHidden: Hide hidden files in Finder
# -------------------------------------------------------------------
alias finderShowHidden='defaults write com.apple.finder ShowAllFiles TRUE'
alias finderHideHidden='defaults write com.apple.finder ShowAllFiles FALSE'
# cleanupLS: Clean up LaunchServices to remove duplicates in the "Open With" menu
# -------------------------------------------------------------------
alias cleanupLS="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
# screensaverDesktop: Run a screensaver on the Desktop
# -------------------------------------------------------------------
alias screensaverDesktop='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background'
# goto iCloud documents folder
# -------------------------------------------------------------------
alias gotoiCloudDocs="cd ~/Library/Mobile\ Documents/com~apple~CloudDocs/"
# ---------------------------------------
# 3. DEVELOPMENT
# ---------------------------------------
# Docker aliases
# - dockerkillall: Kill all running containers.
# - dockercleans: Delete all stopped containers.
# - dockercleanu: Delete all untagged images.
# - dockerclean: Delete all stopped containers and untagged images.
# -------------------------------------------------------------------
alias dockerkillall='docker kill $(docker ps -q)'
alias dockercleans='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
alias dockercleanu='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
alias dockerclean='dockercleanc || true && dockercleani'
# ---------------------------------------
# 4. SECURITY
# ---------------------------------------
alias gh-ssh-add='ssh-add ~/.ssh/gitservices'
# ---------------------------------------
# 5. iCloud
# ---------------------------------------
alias cd-downloads="~'/Library/Mobile Documents/com~apple~CloudDocs/Downloads'"