# macOS / OS X

##### Mac install sshpass

```
brew tap esolitos/ipa
brew install sshpass
```

##### Vagrant bash completion

`brew install vagrant-completion`

add to .bash\_profile:

```
if [ -f `brew --prefix`/etc/bash_completion.d/vagrant ]; then
    source `brew --prefix`/etc/bash_completion.d/vagrant
fi
```

##### Ignore .DS\_Store globally

`echo ".DS_Store" > ~/.gitignore_global`  
`git config --global core.excludesfile ~/.gitignore_global`

##### Update macOS DB File

`/usr/libexec/locate.updatedb`

##### Launch VS Code from Terminal

In VS Code do `<span class="dynamic-keybinding keybinding osx" data-linux="Ctrl+Shift+P" data-osx="⇧⌘P" data-win="Ctrl+Shift+P" title="Windows: Ctrl+Shift+P, Linux: Ctrl+Shift+P">⇧⌘P</span>` and type `Shell Command: Install 'code' command in PATH`  
In Terminal, reload user `source ~/.bash_profile`

##### Find process PID by port

`lsof -i tcp:8080`

##### Mac equivalent to netstat -lntp

`netstat -p tcp -van | grep LISTEN`

##### [Reset Final Cut Pro Trial](https://gist.github.com/dannote/17e0396fe2e19c6e60c915838376d267)

`mv -v ~/Library/Application\ Support/.ffuserdata ~/.Trash`