Config is a basic checklist I follow to set up a new Mac's development environment. It gets me up to speed with Git, Ruby, Node.js, GitHub, Jekyll, Hugo, and more so I can more quickly get back to coding.
-
Visual Studio Code, view source on Github.
Essential extension for VS Code: EditorConfig -
GitHub Desktop, view source on Github
Or, use GitHub CLI, view source on Github -
Setup GitHub Desktop/CLI cloning path:
\home\milan\github
(i.e.\home\<username>\github
)
-
Follow the installation process from official docs.
-
Launching from the command line — you can also run VS Code from the terminal by typing 'code' after adding it to the path:
i. Launch VS Code.
ii. Open the Command Palette Cmd+Shift+P
and type shell command
to find the "Shell Command: Install 'code' command in PATH command".
iii. Restart the terminal for the new $PATH
value to take effect. You'll be able to type code .
in any folder to start editing files in that folder.
- Open Terminal app and run following commang to install Homebrew in your system:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Run these three commands in your terminal to add Homebrew to your PATH:
# ~/.zprofile <-> /users/milan/.zprofile
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /users/milan/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /users/milan/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Once Homebrew has installed, you may want to opt out of the Homebrew analytics data sharing, which is enabled by default. To turn this off, you can set this variable in your environment:
export HOMEBREW_NO_ANALYTICS=1
Alternatively, this will prevent analytics from ever being sent:
brew analytics off
- Run
brew
help to get started - Further documentation: https://docs.brew.sh
Homebrew auto install and setup xCode Command Line Tools. For manual installation open Terminal and trigger Xcode Command Line Tools installation: xcode-select --install
.
If to uninstall Homebrew, read here. - Homebrew FAQ, Superuser
- Install rbenv via Homebrew:
brew install rbenv ruby-build
- Set up rbenv in your shell. Run
rbenv init
and follow the printed instructions:
echo '# rbenv' >> ~/.zprofile
echo 'eval "$(rbenv init -)"' >> ~/.zprofile
- Verify rbenv is configured properly:
type rbenv
- Verify that rbenv is properly set up using rbenv-doctor script:
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
- Download a version of Ruby via rbenv: See https://gorails.com/setup/macos/13-ventura.
# Download a version of Ruby via rbenv:
$ rbenv install 3.2.3
# Make it the global version of Ruby:
$ rbenv global 3.2.3
# Additional dependencies:
$ gem install bundler
- Ruby setup guide by Jekyll.
Installing and managing Ruby with rbenv allows us to specify versions of Ruby on a per-project basis. It also means we can avoid running sudo commands for installing gems and more as it's not affecting OS's system Ruby.
Having trouble with nokogiri? See https://stackoverflow.com/a/41491487.
- Install nodenv via Homebrew:
brew install nodenv
- Set up nodenv in your shell. Run
nodenv init
:
echo '# nodenv' >> ~/.zprofile
echo 'eval "$(nodenv init -)"' >> ~/.zprofile
- Verify nodenv is configured properly:
type nodenv
- Verify that nodenv is properly set up using nodenv-doctor script:
curl -fsSL https://github.com/nodenv/nodenv-installer/raw/master/bin/nodenv-doctor | bash
- Download a version of Node.js via nodenv:
# Download a version of Node.js via nodenv:
$ nodenv install 20.11.1
# Make it the global version of Node.js:
$ nodenv global 20.11.1
# https://www.npmjs.com/package/npm-check-updates
$ npm install -g npm-check-updates
Learn more:
- installing-node-versions
- uninstalling-node-versions
- uninstalling-nodenv
- bin/{node-build,nodenv-install,nodenv-uninstall}
Installing and managing Node.js with nodenv allows us to specify versions of Node on a per-project basis. It also means we can avoid running sudo commands for installing global packages and more as it's not affecting OS's system Node.js.
Please tell me who you are.
- Run to set your account's default identity:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Omit --global
to set the identity only in this repository. For privacy purpose use GitHub private email address id+username@users.noreply.github.com
for git config.
brew install gh
gh auth login
- Follow output of GitHub CLI
gh repo clone milanaryal/config
cd milanaryal/config
gh repo sync
- Best Privacy Web Browser to Stay Private by Privacy Tools
- Firefox Recommended Configuration by Privacy Guides
- Firefox Hardening Resources
- The Ultimate Guide to Firefox Hardening!
about:config
->fission.autostart
=true
about:config
->extensions.pocket.enabled
=false
Sign-up with the following invitation link to get extra 500 MB bonus cloud space:
Brother's (@kshitizaryal):