Giter Site home page Giter Site logo

config's Introduction

Mac Dev Env Screenshot 2022-11-05 at 06 42 50


Config

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.

Checkout


Setup VS Code

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".

shell-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.

Setup Homebrew

  • 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

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

↥ To the top

Setup Ruby

  • 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:
$ rbenv install 3.2.3

# Make it the global version of Ruby: 
$ rbenv global 3.2.3

# Additional dependencies:
$ gem install bundler

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.

↥ To the top

Setup Node.js

  • 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 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.

↥ To the top

Setup Git

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 "[email protected]"

Omit --global to set the identity only in this repository. For privacy purpose use GitHub private email address [email protected] for git config.

↥ To the top

Setup GitHub CLI

brew install gh
gh auth login

See output.

gh repo clone milanaryal/config
cd milanaryal/config
gh repo sync

↥ To the top

Firefox Configuration Setup

Invitation

Sign-up with the following invitation link to get extra 500 MB bonus cloud space:

Brother's (@kshitizaryal):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.