Mac

Mostly for myself when setting up Mac.


The Original Macintosh - Anecdotes about the development of Apple's original Macintosh, and the people who made it.

Below are things to set up Mac / tools I use.

Sign PDF

https://support.apple.com/en-ca/guide/preview/fill-out-and-sign-pdf-forms-prvw35725/mac

Shortcuts

https://github.com/orta/keyboard_shortcuts

On Paste

System Preferences > Keyboard > App Shortcuts > All Applications

add "Paste and Match Style" ⌘V
add "Paste" ⌘V

Context

Sudo with your Touch ID

Add this line to /etc/pam.d/sudo:

auth       sufficient     pam_tid.so

Enable Audio Codec

sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true

Faster key response

defaults write -g KeyRepeat -int 2
defaults write -g InitialKeyRepeat -int 12
KeyRepeat: 120, 90, 60, 30, 12, 6, 2
InitialKeyRepeat: 120, 94, 68, 35, 25, 15
lower equals faster

Open file by editor on iTerm2

Show Hidden files

defaults write com.apple.finder AppleShowAllFiles YES

Open App from 3rd-party developer

defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO

Troubleshootings

https://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error/17980786#17980786

GitHub

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

softwares

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
  • https://totalfinder.binaryage.com
    • download and install
    • restart to recovery mode (hold ⌘R)
    • $ csrutil disable
    • restart
    • restart to recovery mode (hold ⌘R)
    • $ csrutil enable

Git

https://github.com/github/hub

git config --global user.name "Juanito Fatas"
git config --global user.email "juanito.fatas@shopify.com"
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.lp local-push
git config --global color.ui true
git config --global core.editor subl
git config --global core.excludesfile ~/.gitignore_global

SSH

ssh-keygen -t rsa -b 4096 -C "katehuang0320@gmail.com"
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
pbcopy < ~/.ssh/id_rsa.pub

https://github.com/settings/keys

Zip sharing

$ zip -e file.zip file
Enter password:
Verify password:

Video to Gif

Tools

  • IINA
  • Ripgrep (rg) over grep
  • httpie

Any mistake? Send me a Pull Request <3