Skip to content

Latest commit

 

History

History
executable file
·
166 lines (102 loc) · 5.09 KB

File metadata and controls

executable file
·
166 lines (102 loc) · 5.09 KB

Setup instructions

The following instructions will help you to get ready for The Wandering Earth program:

  • Grab a text editor, where you'll spend your day and nights
  • Install a package manager
  • Pimp your Terminal
  • Setup git and GitHub

GitHub account

Have you signed up to GitHub? If not, do it right away.

👉 Upload a picture and put your name correctly on your GitHub account. This is important as we'll use an internal dashboard with your avatars. Please do it now.

Git

To install git, first open a terminal. To open a terminal, you can click on the Ubuntu Start button in the sidebar and type Terminal. Then click on the terminal icon.

Then copy this line with Ctrl + C:

sudo apt install -y git

💡 To paste it in the terminal, you need to use Ctrl + Shift + V.

Visual Studio Code (vscode) - Your text editor

A text editor is one of the most important tools of a developer. Follow these instructions :

Visual Studio Code on Linux Installation

Oh-my-zsh - Fancy your Terminal

We will use the shell named zsh instead of bash, the default one.

sudo apt install -y zsh curl vim nodejs imagemagick jq
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# it will ask for your session password

Be careful, those commands will ask you to type your password twice. At the end your prompt should look like this:

If it doesn't, ask a teacher.

To make this change stick, restart your laptop (or virtual machine):

sudo reboot

GitHub

We need to generate SSH keys which are going to be used by GitHub and Heroku to authenticate you. Think of it as a way to log in, but different from the well known username/password couple. If you already generated keys that you already use with other services, you can skip this step.

Open a terminal and type this, replacing the email with yours (the same one you used to create your GitHub account). It will prompt for information. Just press enter until it asks for a passphrase.

mkdir -p ~/.ssh && ssh-keygen -t ed25519 -o -a 100 -f ~/.ssh/id_ed25519 -C "[email protected]"

NB: when asked for a passphrase, put something you want (and that you'll remember), it's a password to protect your private key stored on your hard drive. You'll type, nothing will show up on the screen, that's normal. Just type the passphrase, and when you're done, press Enter.

Then you need to give your public key to GitHub. Run:

cat ~/.ssh/id_ed25519.pub

It will prompt on the screen the content of the id_ed25519.pub file. Copy that text, then go to github.com/settings/ssh. Click on Add SSH key, fill in the Title with your computer name, and paste the Key. Finish by clicking on the Add key green button.

To check that this step is completed, in the terminal run this. You will be prompted a warning, type yes then Enter.

If you see something like this, you're done!

# Hi --------! You've successfully authenticated, but GitHub does not provide shell access

If it does not work, try running this before trying again the ssh -T command:

ssh-add ~/.ssh/id_ed25519

Don't be in a rush, take time to read this article to get a better understanding of what those keys are used for.

Postgresql

In a few weeks, we'll talk about SQL and Databases and you'll need something called Postgresql, an open-source robust and production-ready database. Let's install it now.

sudo apt install -y postgresql postgresql-contrib libpq-dev build-essential
sudo -u postgres psql --command "CREATE ROLE `whoami` LOGIN createdb;"

Ubuntu inotify

Ubuntu is always tracking changes in your folders, and to do this it uses inotify. By default the Ubuntu limit is set to 8192 files monitored.

As programming involves a lot of files, we need to raise this limit. In your terminal run:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Check-up

Let's check if you successfully installed everything.

Quit all opened Terminal, open a new one and run the following commands:

:construction: The check up script is under development proceed to the next item

It should tell you if your workstation is ready :) If not, ask a teacher.

Slack

Install Slack for Linux (beta).

Launch the app and sign in to irabu organization.

Make sure you upload a picture there.

You can also sign in to Slack on your iPhone or Android device!

The idea is that you'll have Slack open all day, so that you can share useful links / ask for help / etc.

Enjoy your journey with The Wandering Earth project :)