Mac keyboard shortcuts
Delete whole line(s) of text
Ctrl + A + K + K
To delete consecutive lines press ''K'' multiple times.
Always paste without formatting
Show Hidden Files in Finder
Command + Shift + .
Text control
C-A Go to the beginning of the line.
C-E Go to the end of the line.
C-F Go one character forward.
C-B Go one character backward.
C-P Go to the previous line.
C-D Delete the character at the cursor.
C-N Go to the next line.
C-K Erase all the characters to the end of the line.
C-T Flip the character your cursor is on and the one before it.
Shut down or Restart with keyboard shortcut
Command + Control + Power Button: Press this keyboard shortcut to force restart your Mac.
Command Control + Media Eject button: Press this combination to quit all apps and restart the Mac.
Command + Option + Control + Power Button: Press these buttons to quickly turn off your Mac. Log out of current user account with Keyboard Shortcut
Command + Shift + Q: Press this key combination to log out of the current user account. Log out will happen after confirmation.
Command + Shift + Option + Q: When you add Option key to the mix, you will not be asked to confirm and log out will occur right away. Put Mac to Sleep with Keyboard shortcut
Shift + Control + Power (or Eject) button: Press this key combination to quickly turn off the screen, and put Mac to sleep.
Command + Control + Q: Lock screen
Menu Bar and Dock
Ctrl-F2: menu bar
Ctrl-F3: dock