Go to System Preferences > Security & Privacy > FileVault
and make sure the FileVault is ON.
Go to System Preferences > Security & Privacy > Firewall
and make sure the Firewall is ON.
Go to System Preferences > Security & Privacy > General
and set Require password after sleep or screen saver begins
to immediately
or 5 seconds
.
- https://blog.bejarano.io/hardening-macos.html
- https://github.com/drduh/macOS-Security-and-Privacy-Guide
In System preferences > Keyboard
:
Key Repeat > Fast
(all the way to the right)Delay Until Repeat > Short
(all the way to the right)Modifier Keys... > Caps Lock (โช) Key
set to^ Control
Install: https://www.google.com/chrome/browser/desktop/index.html
-
Security / privacy:
-
Utilities:
Install: https://www.mozilla.org/pl/firefox/new/
- Security / privacy:
- ublock-origin
- https-everywhere
- privacy-badger
- Firefox Multi-Account Containers
- Extra effort required (recommended only for advanced users):
Install VS Code: https://code.visualstudio.com/
Open VS Code and:
-
press
Cmd + p
, type> Shell Command: Install 'code' command in Path
and pressEnter
, -
press
Cmd + p
, type> Preferences: Open Settings (JSON)
, pressEnter
, and paste the following settings tosettings.json
:{ "editor.rulers": [ 120 ], "editor.tabSize": 2, "explorer.confirmDragAndDrop": false, "explorer.confirmDelete": false, "workbench.startupEditor": "newUntitledFile", "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, "files.trimFinalNewlines": true, "editor.autoClosingBrackets": "never", "editor.autoClosingOvertype": "never", "editor.autoClosingQuotes": "never", "terminal.integrated.fontFamily": "Meslo LG S DZ for Powerline", }
https://gpgtools.org/#gpgsuite
Install iTerm2: https://www.iterm2.com/downloads.html
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And then, run:
brew analytics off
Install some useful packages:
brew install curl mc
Install Git:
brew install git
Set you username and email in Git:
git config --global user.name "Mona Lisa"
git config --global user.email "[email protected]"
Install Zsh and set it as a default shell:
brew install zsh zsh-completions
chsh -s /bin/zsh
Install Oh My Zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Go to:
iTerm2 > Preferences > Profiles > Colors
- Use
Color presets...
menu to import and select downloadedPastel (Dark Background)
theme
Install Powerline Fonts
cd $HOME
git clone https://github.com/powerline/fonts.git
./fonts/install.sh
rm -rf ~/fonts/
- Go to:
iTerm2 > Preferences > Profiles > Text > Font > Change Font
- Select the font:
Fixed Width > Meslo LG S DZ for Powerline > RegularForPowerline > 11
Set zsh theme
Edit ~/.zshrc
file and update ZSH_THEME=
to:
ZSH_THEME="agnoster"
Edit ~/.zshrc
file and update plugins=
to:
plugins=(git bundler rails)
๐ List of all available plugins is here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins.
Edit ~/.zshrc
file and the following lines at the end:
export EDITOR='vim'
DEFAULT_USER=`whoami`
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt APPEND_HISTORY # append rather than overwrite history file.
setopt EXTENDED_HISTORY # save timestamp and runtime information
setopt HIST_EXPIRE_DUPS_FIRST # allow dups, but expire old ones when I hit HISTSIZE
setopt HIST_FIND_NO_DUPS # don't find duplicates in history
setopt HIST_IGNORE_ALL_DUPS # ignore duplicate commands regardless of commands in between
setopt HIST_IGNORE_DUPS # ignore duplicate commands
setopt HIST_REDUCE_BLANKS # leave blanks out
setopt HIST_SAVE_NO_DUPS # don't save duplicates
setopt INC_APPEND_HISTORY # write after each command
setopt SHARE_HISTORY # share history between sessions
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# homebrew
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS=--require-sha
If you see the following message when starting a new session in the terminal:
compdef: unknown command or service: rails
you can run:
rm ~/.zcompdump*
Install zsh-autosuggestions:
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Edit ~/.zshrc
file and add zsh-autosuggestions
to plugins=
list:
plugins=(.... zsh-autosuggestions)
Edit ~/.zshrc
file and the following lines at the end:
# zsh-autosuggestions
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=30'
Install zsh-syntax-highlighting and zsh-history-substring-search:
brew install zsh-syntax-highlighting zsh-history-substring-search
Edit ~/.zshrc
file and the following lines at the end:
# zsh-syntax-highlighting (must be the last plugin sourced)
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# zsh-history-substring-search (must be sourced after zsh-syntax-highlighting)
source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
Install Janus Vim Distribution:
curl -L https://bit.ly/janus-bootstrap | bash
Map jj
to esc
:
echo ':imap jj <Esc>' >> ~/.vimrc.before
Install exa:
brew install exa
Edit ~/.zshrc
file and the following lines at the end:
# exa
alias l="exa -l -a -a --git --time-style=long-iso --group-directories-first"
Install The Silver Searcher:
brew install the_silver_searcher
brew install postgresql
brew services start postgresql
brew install redis
brew services start redis
Install asdf-vm:
brew install asdf
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.zshrc
# install last version of Ruby
asdf plugin-add ruby
asdf install ruby 2.7.0
asdf global ruby 2.7.0
# install last version of Erlang (required for Elixir)
brew install wxmac # for building with wxWidgets (required to start observer or debugger)
asdf plugin-add erlang
asdf install erlang 22.2.8
asdf global erlang 22.2.8
# install last version of Elixir
asdf plugin-add elixir
asdf install elixir 1.10.2
asdf global elixir 1.10.2
# import the OpenPGP public keys to a dedicated keyring (to be able to check the authenticity of the package)
GNUPGHOME="${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" bash -c 'mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" && bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring'
# install last LTS version of Node JS
asdf plugin-add nodejs
asdf install nodejs 12.16.1
asdf global nodejs 12.16.1
# install last version of Python
asdf plugin-add python
asdf install python 3.8.1
asdf global python 3.8.1
pip install --upgrade pip
# to display the list of available versions, update plugins and use `list-all`, ex:
asdf plugin-update --all
asdf list-all ruby
Sample config for rubocop gem
Check it here: .rubocop.yml.