Skip to content

Commit

Permalink
Merge pull request lewagon#155 from lewagon/refacto-dotfiles
Browse files Browse the repository at this point in the history
smoother dotfiles section
  • Loading branch information
zzuziak authored Oct 6, 2021
2 parents 0b874cb + 5d96a00 commit be2b564
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 70 deletions.
71 changes: 66 additions & 5 deletions LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,12 @@ sudo apt-get install google-cloud-sdk-app-engine-python

## Dotfiles

There are three options, choose _one_:
There are three options, choose **one**:

### 1. I already attended Web Development (FullStack) bootcamp at Le Wagon _on the same laptop_
<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>on the same laptop</em></strong>
</summary>

This means that you already forked the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the new Data Science bootcamp.

Expand All @@ -336,7 +339,15 @@ git commit -m "Update zshrc for Data Science bootcamp"
git push origin master
```

### 2. I did not attend the Web Dev bootcamp at Le Wagon
</details>

OR


<details>
<summary>
<strong>I did not attend the Web Dev bootcamp at Le Wagon</strong>
</summary>

Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub. As your configuration is personal, you need your own repository storing it, so you first need to fork it to your GitHub account.
Expand All @@ -345,9 +356,58 @@ Hackers love to refine and polish their shell and tools. We'll start with a grea
Forking means that it will create a new repo in your GitHub account, identical to the original one. You'll have a new repository on your GitHub account, `your_github_username/dotfiles`. We need to fork because each of you will need to put specific information (e.g. your name) in those
files.
Now this is done, go on with the following instructions under in the `3. ` section right below. :warning: DO NOT SKIP IT!
### 3. I already attended Web Development (FullStack) bootcamp at Le Wagon _but I have a new laptop_
Open your terminal and run the following command:
```bash
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
echo $GITHUB_USERNAME
```
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
There seems to be a problem with the previous step (`gh auth`).

Time to fork the repo and clone it on your laptop:

```bash
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
gh repo fork lewagon/dotfiles --clone
```

Run the `dotfiles` installer.

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
```

Check the emails registered with your GitHub Account. You'll need to pick one
at the next step:
```bash
gh api user/emails | jq -r '.[].email'
```
Run the git installer:
```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
```
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email. Be careful
you **need** to put one of the email listed above thanks to the previous `gh api ...` command. If you
don't do that, Kitt won't be able to track your progress.
Please now **quit** all your opened terminal windows.
</details>
OR
<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>but I have a new laptop</em></strong>
</summary>
Open your terminal and run the following command:
Expand Down Expand Up @@ -390,6 +450,7 @@ you **need** to put one of the email listed above thanks to the previous `gh api
don't do that, Kitt won't be able to track your progress.
Please now **quit** all your opened terminal windows.
</details>
## Disable SSH passphrase prompt
Expand Down
71 changes: 66 additions & 5 deletions WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,12 @@ sudo apt-get install google-cloud-sdk-app-engine-python

## Dotfiles

There are three options, choose _one_:
There are three options, choose **one**:

### 1. I already attended Web Development (FullStack) bootcamp at Le Wagon _on the same laptop_
<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>on the same laptop</em></strong>
</summary>

This means that you already forked the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the new Data Science bootcamp.

Expand All @@ -778,7 +781,15 @@ git commit -m "Update zshrc for Data Science bootcamp"
git push origin master
```

### 2. I did not attend the Web Dev bootcamp at Le Wagon
</details>

OR


<details>
<summary>
<strong>I did not attend the Web Dev bootcamp at Le Wagon</strong>
</summary>

Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub. As your configuration is personal, you need your own repository storing it, so you first need to fork it to your GitHub account.
Expand All @@ -787,9 +798,58 @@ Hackers love to refine and polish their shell and tools. We'll start with a grea
Forking means that it will create a new repo in your GitHub account, identical to the original one. You'll have a new repository on your GitHub account, `your_github_username/dotfiles`. We need to fork because each of you will need to put specific information (e.g. your name) in those
files.
Now this is done, go on with the following instructions under in the `3. ` section right below. :warning: DO NOT SKIP IT!
### 3. I already attended Web Development (FullStack) bootcamp at Le Wagon _but I have a new laptop_
Open your terminal and run the following command:
```bash
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
echo $GITHUB_USERNAME
```
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
There seems to be a problem with the previous step (`gh auth`).

Time to fork the repo and clone it on your laptop:

```bash
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
gh repo fork lewagon/dotfiles --clone
```

Run the `dotfiles` installer.

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
```

Check the emails registered with your GitHub Account. You'll need to pick one
at the next step:
```bash
gh api user/emails | jq -r '.[].email'
```
Run the git installer:
```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
```
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email. Be careful
you **need** to put one of the email listed above thanks to the previous `gh api ...` command. If you
don't do that, Kitt won't be able to track your progress.
Please now **quit** all your opened terminal windows.
</details>
OR
<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>but I have a new laptop</em></strong>
</summary>
Open your terminal and run the following command:
Expand Down Expand Up @@ -832,6 +892,7 @@ you **need** to put one of the email listed above thanks to the previous `gh api
don't do that, Kitt won't be able to track your progress.
Please now **quit** all your opened terminal windows.
</details>
## Disable SSH passphrase prompt
Expand Down
62 changes: 7 additions & 55 deletions _partials/dotfiles.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
## Dotfiles

There are three options, choose _one_:
There are three options, choose **one**:

### 1. I already attended Web Development (FullStack) bootcamp at Le Wagon _on the same laptop_
<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>on the same laptop</em></strong>
</summary>

This means that you already forked the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the new Data Science bootcamp.

Expand All @@ -25,57 +28,6 @@ git commit -m "Update zshrc for Data Science bootcamp"
git push origin master
```

### 2. I did not attend the Web Dev bootcamp at Le Wagon
</details>

Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub. As your configuration is personal, you need your own repository storing it, so you first need to fork it to your GitHub account.

:arrow_right: [Click here to **fork**](https://github.com/lewagon/dotfiles/fork) the `lewagon/dotfiles` repository to your account (you'll need to click again on your picture to confirm _where_ you do the fork).

Forking means that it will create a new repo in your GitHub account, identical to the original one. You'll have a new repository on your GitHub account, `your_github_username/dotfiles`. We need to fork because each of you will need to put specific information (e.g. your name) in those
files.

Now this is done, go on with the following instructions under in the `3. ` section right below. :warning: DO NOT SKIP IT!

### 3. I already attended Web Development (FullStack) bootcamp at Le Wagon _but I have a new laptop_

Open your terminal and run the following command:

```bash
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
echo $GITHUB_USERNAME
```

You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
There seems to be a problem with the previous step (`gh auth`).

Time to fork the repo and clone it on your laptop:

```bash
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
gh repo fork lewagon/dotfiles --clone
```

Run the `dotfiles` installer.

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
```

Check the emails registered with your GitHub Account. You'll need to pick one
at the next step:

```bash
gh api user/emails | jq -r '.[].email'
```

Run the git installer:

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
```

:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email. Be careful
you **need** to put one of the email listed above thanks to the previous `gh api ...` command. If you
don't do that, Kitt won't be able to track your progress.

Please now **quit** all your opened terminal windows.
OR
42 changes: 42 additions & 0 deletions _partials/dotfiles_new_laptop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Open your terminal and run the following command:

```bash
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
echo $GITHUB_USERNAME
```

You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
There seems to be a problem with the previous step (`gh auth`).

Time to fork the repo and clone it on your laptop:

```bash
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
gh repo fork lewagon/dotfiles --clone
```

Run the `dotfiles` installer.

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
```

Check the emails registered with your GitHub Account. You'll need to pick one
at the next step:

```bash
gh api user/emails | jq -r '.[].email'
```

Run the git installer:

```bash
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
```

:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email. Be careful
you **need** to put one of the email listed above thanks to the previous `gh api ...` command. If you
don't do that, Kitt won't be able to track your progress.

Please now **quit** all your opened terminal windows.
</details>
6 changes: 6 additions & 0 deletions _partials/dotfiles_new_laptop_heading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OR

<details>
<summary>
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>but I have a new laptop</em></strong>
</summary>
11 changes: 11 additions & 0 deletions _partials/dotfiles_new_student.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<details>
<summary>
<strong>I did not attend the Web Dev bootcamp at Le Wagon</strong>
</summary>

Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub. As your configuration is personal, you need your own repository storing it, so you first need to fork it to your GitHub account.

:arrow_right: [Click here to **fork**](https://github.com/lewagon/dotfiles/fork) the `lewagon/dotfiles` repository to your account (you'll need to click again on your picture to confirm _where_ you do the fork).

Forking means that it will create a new repo in your GitHub account, identical to the original one. You'll have a new repository on your GitHub account, `your_github_username/dotfiles`. We need to fork because each of you will need to put specific information (e.g. your name) in those
files.
12 changes: 12 additions & 0 deletions build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
setup/gh_cli
setup/ssh_key
dotfiles
dotfiles_new_student
dotfiles_new_laptop
dotfiles_new_laptop_heading
dotfiles_new_laptop
osx_python
virtualenv
pip
Expand Down Expand Up @@ -69,6 +73,10 @@
setup/ssh_key
ubuntu_gcloud
dotfiles
dotfiles_new_student
dotfiles_new_laptop
dotfiles_new_laptop_heading
dotfiles_new_laptop
setup/ssh_agent
ubuntu_python
virtualenv
Expand Down Expand Up @@ -109,6 +117,10 @@
setup/ssh_key
ubuntu_gcloud
dotfiles
dotfiles_new_student
dotfiles_new_laptop
dotfiles_new_laptop_heading
dotfiles_new_laptop
setup/ssh_agent
ubuntu_python
virtualenv
Expand Down
Loading

0 comments on commit be2b564

Please sign in to comment.