Giter Club home page Giter Club logo

fis-computer-setup's Introduction

Watch a Video of These Instructions for MacOS

Welcome student! Before we embark, let's turn your computer from a software consumer computer to a software developer computer. Follow each of these instructions in order. If something doesn't work, stop and try the step again. If it's still not working, ask an instructor for help before you move on!

Note: When you copy/paste a command from this page to your terminal, you may need to hit enter after everything looks like its run!. You might still have commands that need to run!

Setup your terminal

Your terminal (which sometimes you'll hear referred to as a "shell" or "the command line" or a "CLI") will be your primary means of interacting with your computer in the program. This will take the place of navigating through file folders, downloading installers, and running programs by clicking on icons.

MacOS

  • Download and install iTerm2
  • Open iTerm2
  • Go to Profiles -> Open Profiles -> Edit Profiles -> General -> Command, and make sure "Login shell" is selected
  • Close any open terminals with Command + Q, and reopen them

Ubuntu

The default terminal for Ubuntu (GNOME Terminal) will work for this program. Make sure the following option is checked:

โ˜ฐ -> Preferences -> Profiles -> Your Name -> Command -> Run command as a login shell

Install Homebrew

For consumer software, you're probably used to going to a website, downloading a file, and running it on your computer to install it. For developer software, we use package managers to automate a lot of this.

MacOS

Install Homebrew by running this command on your terminal:

xcode-select --install ; /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

If you did this right, you should be able to run:

which brew

and something like /usr/local/bin/brew print out to your screen. If you didn't see anything print out to your screen, Brew didn't install correctly.

Ubuntu

You already have a package manager installed called apt!

Install some packages

Now, we'll use our package manager to download some helpful software we'll use in the program.

MacOS

Run:

brew install git zsh gmp gnupg sqlite postgres

Ubuntu

Run:

sudo apt update
sudo apt install git zsh gnupg sqlite postgresql postgresql-contrib

Install rvm and Ruby

We'll use a tool called rvm to have greater control over which version of ruby we're using.

MacOs and Ubuntu

Run this command:

gpgconf --kill all
gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Remember to hit enter after everything is done!

Close out of all open terminal windows with Command + Q. Then, reopen iterm2.

If this worked correctly, running this in your console should print rvm:

command -v rvm

Then, run:

rvm install 2.6.6
rvm use 2.6.6 --default

Remember: Hit enter after you're done to be sure both commands ran!

If this worked correctly, running this command:

which ruby

should print something that looks like /home/your-name/.rvm/rubies/ruby-2.6.1/bin/ruby and not something like /bin/ruby.

Install Ruby Gems

Gem is another package manager, like Homebrew. We'll use brew for installing software for our computer, and we'll use gem for installing software for our projects.

IMPORTANT NOTE: Never sudo gem install a gem. Gems can be published by well-intentioned developers, geniuses, students, and criminals. At any rate, you probably don't want to give them complete control over your computer.

MacOS and Ubuntu

gem update --system
gem pristine --all
gem install rails learn-co bundler pg nokogiri pry

Hit enter when you're done!

If running:

which rails

prints something like /home/your-name/.rvm/gems/ruby-2.6.6/bin/rails, you're probably in good shape!

Install nvm and Node

Just like rvm gives us more control over which version of Ruby is installed, nvm does that for Node.

MacOS and Ubuntu

Run the following command in your terminal:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Hit enter when you're done!

If this worked, the following command should print nvm:

command -v nvm

If that worked, run the following command in your terminal:

nvm install node
nvm use node
nvm alias default node

Hit enter when you're done!

Install Node Packages

Another package manager? Yep! Gem is for installing packages written in Ruby, and npm is is for installing packages written in JavaScript.

Run the following command in your terminal:

npm install -g yarn lite-server create-react-app

If running:

which lite-server

prints something to the screen, you're probably in good shape!

Set up git

MacOS and Ubuntu

Run these commands, swapping you [email protected] and Your Name for your actual email and name.

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

Follow these steps to connect your computer to Github:

  1. Check if you have an SSH key for your computer: https://docs.github.com/en/github/authenticating-to-github/checking-for-existing-ssh-keys
  2. If you do not add one by following all of these steps: https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Set up zsh

MacOS and Ubuntu

Run:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

When it asks you if you want to switch your shell over to zsh, type "y" and hit enter.

Then close all open instances of your terminal. When you reopen your terminal, your command prompt should have a colored ~ on it.

Set up Learn

MacOS and Ubuntu

Run:

learn whoami

And follow the instructions. Make sure you update the link with your GitHub username.

Set up your text editor

You'll spend most of your time in the program in your text editor. If you already have a preference, keep using it! Switching text editors, even with the same file, is not a big deal. If you're looking for a suggestion, VS Code is a good place to start.

MacOS

Download and install VS Code

Ubuntu

Run the following commands:

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install code

Set up NVM and Node to work every time

MacOS and Ubuntu

Run:

code ~/.zshrc
  • Scroll down to the bottom of the file.
  • Paste all 3 of these lines at the bottom of the file:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Congratulations

Yay! You're done!! ๐Ÿ™Œ ๐Ÿ’ƒ Take a break, get a drink of water, and happy coding!!

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.