instl
Guide to reinstall the latest macOS optimized for Web Development.
Reinstalling macOS
- Backup your data in the Cloud or on a physical drive.
- Startup your mac in Internet Recovery by pressing and holding โโฅR.
- Go to
Disk Utility
and selectView โ Show All Devices
then select the main Apple SSD and clickErase
with format APFS and GUID scheme. - Exit
Disk Utility
and format the drive by clickingReinstall macOS
in the main menu. - This will take some time and then follow the instructions making sure to enable encryption when prompted.
๐ค Automatic Configuration Script
The following tasks marked with run.sh
found in this repository.
curl https://raw.githubusercontent.com/tobua/instl/main/run.sh -o run.sh
sh run.sh
# Follow instructions in script and then restart to run again with sudo.
sudo sh run.sh
Configuring the System
- Open
โ๏ธ System Preferences
and sign in to your Apple ID. ๐ค Increase mouse tracking speed inโ๏ธ Mouse
and enable secondary click if you're using Magic Mouse.- Remove unused apps from dock and
๐ค disableShow recent applications
in dock preferences. ๐ค Inโ๏ธ Mission Control โ Hot Corners...
add Mission Control to Bottom Right and Desktop to Bottom Left.๐ค โ๏ธ Battery
increase time until display turns off when onPower Adapter
.๐ค Install Updates and enableAutomatically keep my Mac up to date
inโ๏ธ Software Update
settings.- Edit the Desktop Background in
โ๏ธ Desktop & Screen Saver
. - Make sure Guest Account is disabled in
โ๏ธ Users & Groups
. - In
โ๏ธ Security & Privacy
enable unlocking with Apple Watch.
Optional: Input Language with Special Characters
Recommended if you frequently switch to a local language requiring special characters. If you only need a few characters every once in a while try pressing and holding the related character a โ 4 โ รค
and a menu to select the desired special character will show up. If this isn't enough go to โ๏ธ Keyboard โ Input Sources
and press +
to add another input language. To easily switch the input language layout go to โ๏ธ Keyboard โ Shortcuts
and under Input Sources
set โฅSpace as the shortcut for next language.
Applications
๐ค Chrome Browser๐ค node JavaScript๐ค VS Code Code Editor- Move to the Applications folder before opening.
๐ค Sourcetree Git
Application Specific Setup
๐ค Terminal
Run the following in the Terminal to avoid showing the computer name for every prompt. The command will create a .zshrc
file in the user root folder. In between the single quotation marks you can add whatever you prefer. Restart the Terminal for the changes to take effect.
echo "export PS1='โ '" >> ~/.zshrc
๐ค npm
[sudo] npm i -g epic-cli
epic-cli provides useful everyday commands.
VS Code
๐ค Extensions โโงX: Install the following- Prettier
- ESLint
๐ค Theme โKT: and selectLight+
.๐ค Layout: DisableView โ Show Minimap
,View โ Show Breadcrumbs
,View โ Appearance โ Show Activity Bar
andView โ Appearance โ Show Status Bar
(If any of the extensions don't work check the status bar).๐ค Settings โ[Comma]:- Check
Text Editor โ Formatting โ Format On Save
to format the code with the Prettier extension. - Enable
Text Editor โ Bracket Pair Colorization
to better recognize matching nested brackets. ๐ฅท Mode: TurnText Editor โ Line Numbers
off, uncheckText Editor โ Folding
and uncheckText Editor โ Glyph Margin
. Click the dots next to explorer on the top-left and uncheck all.
- Check
- Usage
- Toggle the Terminal with โJ.
- Select multiple cursors with โฅ[Click].
- โD will add another cursor to the next found current selection below.
- Search with โโงF and switch back to the file tree view with โโงE.
Sourcetree
Ignore connecting during startup and then go to the Remote
tab and click connect. Add your GitHub account, which will automatically connect when you're already logged in in the browser. Logging into GitHub in Chrome make sure to remove existing SSH keys from old installations. Back in Sourcetree generate a new SSH key and Save
. Checking out won't work until the authenticity of github.com has been confirmed. This can be done in the Terminal and by cloning any repository (install developer tools when prompted)
git clone git@github.com:[username]/[repository].git [destination-folder]
enter yes
to add GitHub to known hosts. The following command will ensure the key is available when committing.
ssh-add --apple-use-keychain ~/.ssh/[GitHub-Username]-GitHub
The SSH key generated by Sourcetree will only be valid for the current session. To push or checkout with Sourcetree run the above again in Terminal after every restart or logout. To avoid running it after every restart it's also possible to add it to .zshrc
after which the key will be available once the Terminal has opened. Use sudo vim ~/.zshrc
to edit this file, which has already been created and appended by the run.sh
script.
# Load SSH key.
ssh-add -q --apple-use-keychain ~/.ssh/[GitHub-Username]-GitHub
Usage
- Press โโง. to show hidden files temporarly in Finder.
React Native
- Download and open XCode from App Store.
- React Native can work with the preinstalled version of
gem
but upgrading doesn't work well. To avoid this install homebrew and then runbrew install rbenv ruby-build
to install the Ruby environment manager. Runrbenv install -l
to list the newest stable release and install it withrbenv install X.Y.Z
and apply it withrbenv global X.Y.Z
.- Add the following lines with
sudo vim ~/.zshrc
to the file and restart the Terminal. - Check if the switch was successful with
ruby --version
.
- Add the following lines with
# Add rbenv Ruby to path.
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Add gems to path.
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"
- Install Cocoapods gem with
gem install cocoapods --user-install
and update all gems withgem update
. Also, rungem update --system
to update gem itself. - Download and install AndroidStudio Android IDE.
- Use Android Studio to open the
/android
project folder from a React Native installation. - Update dependencies in the
SDK Manager
(icon in top-right). When using numic make sure to install the CLI tools. - Add a new Virtual Device in the
Device Manager
. - Add below binaries (includes adb) to path with
sudo vim ~/.zshrc
.
- Use Android Studio to open the
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
# Use Java bundled with Android Studio.
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
# Required by flipper debugger.
export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
Update Native Android Installation
The default gradle version from the react-native installation will only work with very old Java versions.
- Update gradle to newest version in Gradle Releases and Google Maven for build.gradle
- File android/build.gradle
- and android/gradle/wrapper/gradle-wrapper.properties