Mac Tips & Tricks - 2016



Series: Awesome Tips about Mac



Configuration
Use all F1, F2, etc. keys as standard function keys
System Preferences > Keyboard -> Use all F1, F2, etc. keys as standard function keys
Display fn keys by default in Touch Bar
System Preferences → Keyboard → Shortcuts, under Function Keys, add apps to the list to show the function keys by default.

Search in current folder instead of everywhere - link
Go to preference in finder, select "Search the Current Folder" in "When performing a search" and "Advanced" tab 

System Preferences > Keyboard > Shortcuts > All controls
- then we can use tab to move and use space to select the active button

System Preferences > Trackpad > Point & Click > Tap to click

Disable the new touchbar function and have the old F-keys with brightness, volume backlight
- Keybard gt; select "Expanded Control Strip" in the "Touch Bar Shows"

- Keyboard gt; Shortcuts tab gt; "Function Keys" gt; Click the + and add the applications where you want the F-keys to always show

Keychain Access > Manage passwords and certificates

Change default browser
System Preferences > General > Default web browser

Disable Slightly dim the display while on battery power under the Battery tab of Energy Saver.
- Otherwise after plugin power adapter, it will automatically be brighter.

Shortcuts
Go to Folder
/ or Command+Shift+G ->
- Use tab completion

CONTROL + a/e > Got to head/end - work in Terminal, Chrome, Atom

Command+` > cycle between open windows in selected application

xtrafinder support features:
Press Enter or Return to open selection
New File
Copy Path
Copy to, Move to
New Terminal Here

Finder
Command+i > Show info
Command+shift+deelete > Empty the trash

Rename a file or folder
- By default, we can press enter to change file name. 
- If we use XtraFinder and configure it to press Enter to open file, then we can press fn+enter to rename a file.

Close Windows
Undo/Redo:  Command + Z/Y
Command-Shift-W to close a window
Command-Option-W, Close all windows

Zoom out/in
System Preferences > Accessibility > Zoom
Check "Use keyboard shortcuts to zoom":
COMMAND + OPTION + 8 > Toogle Zoom
COMMAND + OPTION + = > zoom out
COMMAND + OPTION + - > zoom in

Check "Use scroll gesture with modifier keys to zoom"
Scroll scroll on the trackpad while pressing one of keys: CONTROL, OPTION, or COMMAND

Most applications supports: 
COMMAND + "+" > zoom out 
COMMAND + "-" > zoom in

Allow or disallow unidentified apps
Ctrl+click or right click then select Open from the contextual menu.

System Preferences > Privacy & Security > General > Allow applications downloaded from


Automatically Hide the Dock
System Preferences > Dock > Automatically hide and show the Dock
Command+Option+D: hide or show dock

Command + H > hide the current application

Force Quit Applications
Using shortcuts: Command + Option + Escape
Using Activity Monitor
Option + click application in the dock

Cmd + Ctrl + D > Dictionary

Activity Monitor

Spotlight Search: Command + Space
Show file location
- Hold Command key
Open file in Finder
- Hold Command key + enter
- Hold Command key + double-click on the result

Exclude folders from Spotlight Index

System Preferences -> Spotlight -> Privacy tab, add folder to exclude from index

Search in current folder rather than everywhere
Open Finder's preference, choose "Search the Current Folder" in Advanced tab

Install/Use GNU tools
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt
Search Contents of .jar Files for Specific String
gfind . -iname '*.jar' -printf "unzip -c %p | grep -q 'string_to_search' && echo %p\n" | sh



Homebrew
brew doctor
brew update && brew upgrade
brew cleanup     > remove older version
brew cleanup -ns >  Show what will be removed

brew tap caskroom/versions
brew cask install java7

Install GNU Command Line Tools
brew install coreutils
brew install wget

brew cask install iterm2
Reuse previous session's directory
Preferences > Profiles > Default > General > Working Directory > Reuse previous session's directory
⌘ + click to open url or file

Cmd+Shift+H   Paste History
Cmd+K             Clear buffer

Disable swap space
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
sudo rm -rf /private/var/vm/swapfile*

launchctl
sudo launchctl stop|start com.openssh.sshd

Applications
How to make phone calls on your Mac
Messages 
- send/receive messages from mac
Apple Mail
Use rules to manage your inbox

Outlook
Do a basic search in Outlook: OPTION + COMMAND+ F
Do an advanced search in Outlook: SHIFT + COMMAND+ F
Find text within an item: COMMAND+ F

Install Programs from Unidentified Developers
Preferences > Security & Privacy  General  Allow apps downloaded from
To Manually Launch Application: Holding control key + choose open from dropdown menu

Kill Parental Controls
pgrep parentalcontrolsd 
sudo pkill -9 parentalcontrolsd

Resources
Making Sense of Mac Keyboard Symbols

Labels

adsense (5) Algorithm (69) Algorithm Series (35) Android (7) ANT (6) bat (8) Big Data (7) Blogger (14) Bugs (6) Cache (5) Chrome (19) Code Example (29) Code Quality (7) Coding Skills (5) Database (7) Debug (16) Design (5) Dev Tips (63) Eclipse (32) Git (5) Google (33) Guava (7) How to (9) Http Client (8) IDE (7) Interview (88) J2EE (13) J2SE (49) Java (186) JavaScript (27) JSON (7) Learning code (9) Lesson Learned (6) Linux (26) Lucene-Solr (112) Mac (10) Maven (8) Network (9) Nutch2 (18) Performance (9) PowerShell (11) Problem Solving (11) Programmer Skills (6) regex (5) Scala (6) Security (9) Soft Skills (38) Spring (22) System Design (11) Testing (7) Text Mining (14) Tips (17) Tools (24) Troubleshooting (29) UIMA (9) Web Development (19) Windows (21) xml (5)