- trackpad - tap to click, tracking speed fast, set all other gestures on
- software update - turn auto update OFF
- siri off
- general
- allow handoff
- turn off "Close windows when quitting an app"
- desktop and screensaver - setup screensaver, and hot corners: top left for screen lock, top right for put display to sleep
- dock
- autohide, bottom, always show wfi, bluetooth, focus, screen mirroring, display, keyboard brightness, sound and time machine icons
- clock 24 hours
- spotlight OFF in menu bar
- mission control
- don't auto arrange spaces based on usage
- siri - OFF
- accessibility
- ponter control - enable dragging, three-finger drag
- network
- wifi / advanced / dns: google servers 8.8.8.8 and 8.8.4.4, and add "local" to search domains
- sound - play feedback when volume is changed
- touch id - add all the fingers you want
- keyboard
- shortcuts - add the
Ctrl+1
etc shortcuts for mission control/spaces - text - tweak "Text" settings to get rid of auto-correct etc
- make repeat and delay til repeat their fastest settings
- shortcuts - add the
- finder - set preferences and customise toolbar
Install Rosetta so that we can run apps not built for Apple silicon:
$ softwareupdate --install-rosetta
- 1password
- nordvpn
- VLC
- zoom
- skype
- spotify
- chrome
- firefox
- tor
- audacity
- pocket casts
- pages
- numbers
- keynote
- garage band
- handbrake
- iexplorer
- discord
- sphero edu
- the unarchiver
- iMessage - check settings on iPhone to make sure text message forwarding is on
- tg pro (cpu temp etc)
We want chrome to remember which windows belonged to which desktops when restarting. See https://superuser.com/questions/1111535/how-can-i-make-osx-remember-the-desktop-assignment-of-different-chrome-windows.
$ defaults write com.google.Chrome NSWindowRestoresWorkspaceAtLaunch -bool YES
Set "fullscreen" mode to native in preferences.
- set a custom screenshots folder (see https://medium.com/swlh/7-macos-setup-tips-for-developers-b28a999b70b5)
- use touchid for sudo commands (see https://www.youtube.com/watch?v=qOrlYzqXPa8&t=633s)
When tethering via USB, the system can sometimes be still using the normal WIFI router settings for DNS resolution. Use this to manually set the DNS settings for the USB network connection:
$ networksetup -setdnsservers "iPhone USB" 8.8.8.8 8.8.4.4
$ networksetup -setsearchdomains "iPhone USB" local$
$ dscacheutil -flushcache
"Rectangle" seems like a simple and powerful window manager, and open source! Install via brew
.
$ brew install --cask rectangle
See also: https://github.com/rxhanson/Rectangle and: https://rectangleapp.com/ and maybe: https://charmstone.app/
- slack
- sourcetree
- xcode w/ cmdline tools
$ xcode-select --install
Install as per https://brew.sh. Some standard brew installs:
$ brew install wget
$ brew install imagemagick
$ brew install ffmpeg
$ brew install youtube-dl
$ brew install exiftool
$ brew install tree
And some fun stuff
$ brew install samtay/tui/tetris
$ brew install toilet
$ brew install cmatrix
$ brew install asciiquarium
Change to latest version of bash via homebrew:
$ brew install bash
$ sudo vi /etc/shells # add "/opt/homebrew/bin/bash" to the end of the file
$ chsh -s /opt/homebrew/bin/bash
Preferences:
- select "Close if the shell exited cleanly" in "Shell" tab
FZW, see https://github.com/junegunn/fzf
$ $(brew --prefix)/opt/fzf/install
Install pathogen as per https://www.vim.org/scripts/script.php?script_id=2332
$ mkdir -p ~/.vim/autoload ~/.vim/bundle
$ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Install NERDTree as per https://github.com/preservim/nerdtree
$ git clone https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree
Install EditorConfig as per https://github.com/preservim/nerdtree
$ git clone https://github.com/editorconfig/editorconfig-vim ~/.vim/bundle/nerdtree
Use DBNgin to install MySQL 5.7 and MySQL 8. Use different ports for each. Once installed set the root password in each (mainly because phpmyadmin needs a password). For 5.7:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mwmGZN]%o_1n4pltQc6l6=zIjtd$lr%l';
And for MySQL 8:
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'mwmGZN]%o_1n4pltQc6l6=zIjtd$lr%l';
Then create a ~/.my.cnf
file for root login credentials.
Use the approach as in https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions. In other words we use homebrew:
$ brew tap shivammathur/php
All info about installing, upgrading, re-linking etc can be found at github repo
https://github.com/shivammathur/homebrew-php
The ini files can be found in /opt/homebrew/etc/php/...
. Other info from homebrew:
To restart shivammathur/php/php after an upgrade:
brew services restart shivammathur/php/php
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/php/sbin/php-fpm --nodaemonize
You may need to edit the php ini files at some stage:
$ php --ini
$ vi /opt/homebrew/etc/php/7.4/php.ini
Some common edits:
- Sometimes craft cms backend needs a lot of input vars -
max_input_vars=6000
Use homebrew to install. Then add to the bottom of /opt/homebrew/share/phpmyadmin/config.inc.php
:
$cfg['Servers'][1]['host'] = '127.0.0.1';
// $cfg['blowfish_secret'] = 'dht-+@+3M[z%$+vuQ3Q|UlEJ|H}3WoDofU[*jLm#CY3';
$cfg['ShowAll'] = true;
$cfg['MaxRows'] = 100;
//$cfg['NavigationTreeDisableDatabaseExpansion'] = true;
$cfg['MaxNavigationItems'] = 200;
$cfg['NavigationTreeDisplayItemFilterMinimum'] = 200;
$cfg['NavigationTreeEnableGrouping'] = false;
// $cfg['TempDir'] = '/tmp';
Setting host to 127.0.0.1
rather than localhost
is important.
To make sure you can use phpmyadmin in valet
, do the following:
$ cd /opt/homebrew/Cellar/phpmyadmin/5.2.1/share/phpmyadmin # use correct version in path!
$ valet link pma.valet --secure
See https://getcomposer.org/download/ for downloading into a tmp dir. Then create /usr/local/bin
and
mv the file there.
$ sudo mkdir /usr/local/bin
$ sudo mv composer.phar /usr/local/bin/composer
Also, it's handy to allow composer to use as much memory as possible. See https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
$ export COMPOSER_MEMORY_LIMIT=-1
UPDATE
See https://joostvanveen.com/run-composer-1-and-2-simultaniously
Install Composer globally, following the instructions from https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos. This will install the latest Composer 2 version in /usr/local/bin.
- (on Mac you can simply run brew install composer)
- Move composer to composer2: mv /usr/local/bin/composer /usr/local/bin/composer2
- CD to the /usr/local/bin/ folder: /usr/local/bin/
- Download the latest V1 version from https://getcomposer.org/download/1.10.17/composer.phar : wget https://getcomposer.org/download/1.10.17/composer.phar
- Make the downloaded phar file executable: chmod 755 composer.phar
- Rename composer to composer1: mv /usr/local/bin/composer.phar /usr/local/bin/composer1
- Now create a symlink for the global version you want to use: ln -s /usr/local/bin/composer1 /usr/local/bin/composer. If you are using a local PHP switcher like dnsmasq or valet, make sure to use composer1 as your global Composer version - otherwise you will get Composer errors if you are on PHP < 7.2.0. If you never run PHP < 7.2.0 locally, you should use Composer 2 as your default.
- To use global Composer: run composer --version
- To use global Composer 1: run composer1 --version
- To use global Composer 2: run composer2 --version
See https://github.com/nvm-sh/nvm for basic install. Install various versions of node/npm:
$ nvm install node
$ nvm install 16
$ nvm install 14
$ nvm install 12
$ nvm use 18
$ npm install --global yarn
Install the github CLI and then use it to cache credentials.
$ brew install gh
$ gh auth login
See
- https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git
- https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts
Instructions here: https://code.visualstudio.com/docs/setup/mac
$ composer global require laravel/valet
$ valet install
If for some reason you get a "Bad gateway" when trying to load a local site, try the following in turn:
$ valet restart
$ valet install
$ valet unisolate ...then... valet isolate [email protected]
See https://ngrok.com/download.
$ brew install ngrok/ngrok/ngrok
Follow the instructions here: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. And then setup the ~/.aws/{config,credentials}
files.
Follow the instructions for installing on Unix https://exiftool.org/install.html. Then link to the perl executable so that it ends up in the homebrew bin:
$ ln -s /opt/homebrew//Cellar/perl/5.34.0/bin/exiftool /opt/homebrew/bin/exiftool
See https://devcenter.heroku.com/articles/heroku-cli. Install via homebrew.
$ brew tap heroku/brew && brew install heroku
$ heroku autocomplete
Install the Atlas Mongodb CLI tool, and mongosh:
$ brew install mongocli
$ brew install mongosh
Then install the mongodb driver for each php version. See
- https://www.php.net/manual/en/mongodb.installation.homebrew.php
- https://nono.ma/install-mongodb-php-extension-macos
For php 8.2 (the simplest):
$ sudo pecl install mongodb
$ pecl list
$ php --ri mongodb
For php 8.1 (and similar for other older versions), we have to copy the pcre2.h
file into the php ext directory for the current php version (o/w the C compilation of the extension fails)
$ cp /opt/homebrew/Cellar/pcre2/10.40/include/pcre2.h /opt/homebrew/Cellar/[email protected]/8.1.13/include/php/ext/pcre/pcre2.h
$ sudo pecl install mongodb
$ pecl list
$ php --ri mongodb
And so on for the other versions. To inspect the homebrew php dirs for each installed version, use
$ ls -l /opt/homebrew/Cellar/php@*
Then maybe install the GUI admin tool, MongoDB Compass. See https://www.mongodb.com/try/download/compass
See here: https://docs.docker.com/desktop/install/mac-install/
$ brew install jq