Cheat Sheet

MacOS tips and tricks.

General

Allow Apps from Anywhere in Gatekeeper for macOS Catalina, macOS Mojave, MacOS Sierra

sudo spctl --master-disable

Sign app

codesign --force --deep --sign - /Applications/AppName.app

Arrange windows

Split view

Hold down the full-screen button  in the upper-left corner of a window.

https://support.apple.com/en-us/HT204948

Spectacle

https://www.spectacleapp.com/

https://www.howtogeek.com/288124/how-to-rearrange-your-macs-windows-with-a-keyboard-shorcut/

Automator

Shortcut to open iTerm2

Press Command + space bar to launch Spotlight. Run automator.

Create a New Document type Quick Action.

Setup the new Action as follows.

Save the as as Open iTerm2.

Open and change the keyboard shortcut config as follows (you can change the shortcut key combination).

Custom printscreen

Automate printscreen with no screen border or shadow.

Create the following script anywhere in you computer.

Save it and make sure to chmod +rx it.

Press Command + space bar to launch Spotlight. Run automator.

Create a New Document type Quick Action.

Setup the new Action as follows.

Save it as "Custom snap".

Make sure to "Run" it before creating a keyboard shortcut because it requires some MacOS "allow" actions.

To create a keyboard shortcut go to Settings -> Keyboard as follows.

Copy to clipboard the URL of all Safari tabs

Defaults

Screenshots path

Docker

Bash auto complete

Install bash-completion:

Install docker-compse auto complete:

Create symbolic links:

Edit bash_profile:

Add the following content:

Open a new terminal and test.

Monitoring

public-apis

osascript

Activate window

Activate the app, to bring it to the front

User other app names such as Chrome.

Resize window in pixels

Bounds is startX, startY, endX, endY.

User other app names such as Chrome.

Last updated