Skip to content

Commit 3e7b657

Browse files
lorcanraegithub-actions
andauthored
Simplified dotfiles (#73)
* chore: updated build script with simplified dotfiles * refactor: share dotfiles_simple from main-automation * setup guides generated --------- Co-authored-by: github-actions <github-actions@github.com>
1 parent 2830523 commit 3e7b657

6 files changed

Lines changed: 176 additions & 303 deletions

File tree

LINUX.md

Lines changed: 31 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -669,79 +669,57 @@ The browser has now saved the service account json file 🔑 in your downloads d
669669
670670
## Dotfiles
671671
672-
Let's pimp your zsh and and vscode by installing lewagon recommanded dotfiles **on your Virtual Machine**
672+
Let's enhance the developer experience on your Virtual Machine by install Le Wagon's pre-configured [dotfiles 🔗](https://github.com/lewagon/dotfiles) for your terminal, zsh and VS Code.
673673
674-
There are three options, choose **one**:
675-
676-
<details>
677-
<summary>
678-
<strong>I already attended Web-Dev or Data-Science bootcamp at Le Wagon <em>🚨 on the same Virtual Machine (highly unlikely!🚨)</em></strong>
679-
</summary>
680-
681-
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.
682-
683-
Open your terminal and go to your `dotfiles` project:
684-
685-
```bash
686-
cd ~/code/<YOUR_GITHUB_NICKNAME>/dotfiles
687-
code . # Open it in VS Code
688-
```
689-
690-
In VS Code, open the `zshrc` file. Replace its content with the [newest version](https://raw.githubusercontent.com/lewagon/dotfiles/master/zshrc) of that file that we provide. Save to disk.
691-
692-
Back to the terminal, run a `git diff` and ask a TA to come and check about this configuration change. You should see stuff about Python and `pyenv`.
693-
694-
Once this is good, commit and push your changes:
695-
696-
```bash
697-
git add zshrc
698-
git commit -m "Update zshrc for Data Engineering bootcamp"
699-
git push origin master
700-
```
701-
702-
</details>
703-
704-
OR
674+
To customise this configuration for yourself, you'll need to **fork** the repository to your own Github account.
705675
676+
**Forking** creates a copy of the repository under your account (`your_github_username/dotfiles`), which you can then modify with your personal information, such as your name.
706677
707678
<details>
708-
<summary>
709-
<strong>I did not attend the Web-Dev or Data-Science bootcamp at Le Wagon</strong>
710-
</summary>
679+
<summary>❗ I started a Le Wagon <strong>Web Development</strong> or <strong>Data Science</strong> bootcamp in 2021 or earlier. ❗</summary>
711680
712-
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.
681+
You may have a older version of the Le Wagon dotfiles. The second Ansible playbook will try to modify some of these dotfiles.
713682
714-
: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).
715683
716-
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
717-
files.
684+
Open a ticket with a TA and do one of the following:
685+
- Compare your existing dotfiles with the current Le Wagon [dotfiles 🔗](https://github.com/lewagon/dotfiles), particularly the `.zshrc` and `settings.json` - if there is no meaningful difference, continue with the setup.
686+
- If you are OK with losing your existing dotfiles - delete your existing dotfiles repository on GitHub and continue with the setup
687+
- If you do not want to lose your existing dotfiles, we recommend working with branches:
688+
- On your **laptop**, or wherever you have a **local** copy of **your** copy of dotfiles
689+
- Create a branch of your existing dotfiles setup, and push to GitHub - `origin <branchname>`
690+
- On `local main` (or a new named branch), pull from `upstream main`, resolve any conflicts, commit, and push. It is important that you accept incoming changes to the `.zshrc` and `settings.json` files
691+
- Continue with the setup
692+
- If you pulled from `upstream main` to a new named branch, change to that branch before executing the dotfiles installer: `install.sh`.
693+
- Open `git_setup.sh` in a text editor and comment out or remove the lines that push to `origin main`
694+
</details>
718695
696+
<br>
719697
720-
Open your terminal and run the following command:
698+
Open your terminal on your VM and run the following command:
721699
722700
```bash
723701
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
724702
echo $GITHUB_USERNAME
725703
```
726704

727-
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
728-
There seems to be a problem with the previous step (`gh auth`).
705+
You should see your Github username printed.
706+
707+
❗ If you do not see your Github username being printed - **stop here** - and raise a ticket with a TA 🙋 There may be a problem with the previous step (`gh auth`).
729708

730-
Time to fork the repo and clone it on your laptop:
709+
To fork the Le Wagon dotfiles repository and clone it on your Virtual Machine. Execute the following command:
731710

732711
```bash
733712
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
734713
gh repo fork lewagon/dotfiles --clone
735714
```
736715

737-
Run the `dotfiles` installer.
716+
Run the `dotfiles` installer with:
738717

739718
```bash
740719
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
741720
```
742721

743-
Check the emails registered with your GitHub Account. You'll need to pick one
744-
at the next step:
722+
Check the emails registered with your GitHub Account. You'll need to pick one on the next step:
745723

746724
```bash
747725
gh api user/emails | jq -r '.[].email'
@@ -755,62 +733,19 @@ cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
755733

756734
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
757735

758-
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command.
759-
If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if
760-
you don't want your email to appear in public repositories you may contribute to.
761-
</details>
762-
763-
764-
OR
765-
766-
<details>
767-
<summary>
768-
<strong>I already attended Web-Dev or Data-Science bootcamp at Le Wagon <em>but not on this VM</em></strong>
769-
</summary>
770-
771-
772-
Open your terminal and run the following command:
736+
:warning: You **need** to put one of the emails listed above from the previous `gh api ...` command.
737+
If you do not enter a valid email, Kitt will not be able to track your progress.
773738

774-
```bash
775-
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
776-
echo $GITHUB_USERNAME
777-
```
778-
779-
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
780-
There seems to be a problem with the previous step (`gh auth`).
781-
782-
Time to fork the repo and clone it on your laptop:
783-
784-
```bash
785-
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
786-
gh repo fork lewagon/dotfiles --clone
787-
```
788-
789-
Run the `dotfiles` installer.
790-
791-
```bash
792-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
793-
```
739+
💡 Select the `...@users.noreply.github.com` address if you don't want your email to appear in public repositories you may contribute to.
794740

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

798-
```bash
799-
gh api user/emails | jq -r '.[].email'
800-
```
742+
---
801743

802-
Run the git installer:
744+
Once you have finished installing the **dotfiles**, kill your terminal (little trash can at the top right of the terminal window) and re-open it. You might have to do it a few times until it looks similar to:
803745

804-
```bash
805-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
806-
```
746+
![](/images/vscode_after_ansible1.png)
807747

808-
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
809-
810-
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command.
811-
If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if
812-
you don't want your email to appear in public repositories you may contribute to.
813-
</details>
748+
The terminal should read as `zsh`.
814749

815750

816751
### zsh default terminal

WINDOWS.md

Lines changed: 31 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -636,79 +636,57 @@ The browser has now saved the service account json file 🔑 in your downloads d
636636
637637
## Dotfiles
638638
639-
Let's pimp your zsh and and vscode by installing lewagon recommanded dotfiles **on your Virtual Machine**
639+
Let's enhance the developer experience on your Virtual Machine by install Le Wagon's pre-configured [dotfiles 🔗](https://github.com/lewagon/dotfiles) for your terminal, zsh and VS Code.
640640
641-
There are three options, choose **one**:
642-
643-
<details>
644-
<summary>
645-
<strong>I already attended Web-Dev or Data-Science bootcamp at Le Wagon <em>🚨 on the same Virtual Machine (highly unlikely!🚨)</em></strong>
646-
</summary>
647-
648-
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.
649-
650-
Open your terminal and go to your `dotfiles` project:
651-
652-
```bash
653-
cd ~/code/<YOUR_GITHUB_NICKNAME>/dotfiles
654-
code . # Open it in VS Code
655-
```
656-
657-
In VS Code, open the `zshrc` file. Replace its content with the [newest version](https://raw.githubusercontent.com/lewagon/dotfiles/master/zshrc) of that file that we provide. Save to disk.
658-
659-
Back to the terminal, run a `git diff` and ask a TA to come and check about this configuration change. You should see stuff about Python and `pyenv`.
660-
661-
Once this is good, commit and push your changes:
662-
663-
```bash
664-
git add zshrc
665-
git commit -m "Update zshrc for Data Engineering bootcamp"
666-
git push origin master
667-
```
668-
669-
</details>
670-
671-
OR
641+
To customise this configuration for yourself, you'll need to **fork** the repository to your own Github account.
672642
643+
**Forking** creates a copy of the repository under your account (`your_github_username/dotfiles`), which you can then modify with your personal information, such as your name.
673644
674645
<details>
675-
<summary>
676-
<strong>I did not attend the Web-Dev or Data-Science bootcamp at Le Wagon</strong>
677-
</summary>
646+
<summary>❗ I started a Le Wagon <strong>Web Development</strong> or <strong>Data Science</strong> bootcamp in 2021 or earlier. ❗</summary>
678647
679-
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.
648+
You may have a older version of the Le Wagon dotfiles. The second Ansible playbook will try to modify some of these dotfiles.
680649
681-
: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).
682650
683-
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
684-
files.
651+
Open a ticket with a TA and do one of the following:
652+
- Compare your existing dotfiles with the current Le Wagon [dotfiles 🔗](https://github.com/lewagon/dotfiles), particularly the `.zshrc` and `settings.json` - if there is no meaningful difference, continue with the setup.
653+
- If you are OK with losing your existing dotfiles - delete your existing dotfiles repository on GitHub and continue with the setup
654+
- If you do not want to lose your existing dotfiles, we recommend working with branches:
655+
- On your **laptop**, or wherever you have a **local** copy of **your** copy of dotfiles
656+
- Create a branch of your existing dotfiles setup, and push to GitHub - `origin <branchname>`
657+
- On `local main` (or a new named branch), pull from `upstream main`, resolve any conflicts, commit, and push. It is important that you accept incoming changes to the `.zshrc` and `settings.json` files
658+
- Continue with the setup
659+
- If you pulled from `upstream main` to a new named branch, change to that branch before executing the dotfiles installer: `install.sh`.
660+
- Open `git_setup.sh` in a text editor and comment out or remove the lines that push to `origin main`
661+
</details>
685662
663+
<br>
686664
687-
Open your terminal and run the following command:
665+
Open your terminal on your VM and run the following command:
688666
689667
```bash
690668
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
691669
echo $GITHUB_USERNAME
692670
```
693671

694-
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
695-
There seems to be a problem with the previous step (`gh auth`).
672+
You should see your Github username printed.
673+
674+
❗ If you do not see your Github username being printed - **stop here** - and raise a ticket with a TA 🙋 There may be a problem with the previous step (`gh auth`).
696675

697-
Time to fork the repo and clone it on your laptop:
676+
To fork the Le Wagon dotfiles repository and clone it on your Virtual Machine. Execute the following command:
698677

699678
```bash
700679
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
701680
gh repo fork lewagon/dotfiles --clone
702681
```
703682

704-
Run the `dotfiles` installer.
683+
Run the `dotfiles` installer with:
705684

706685
```bash
707686
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
708687
```
709688

710-
Check the emails registered with your GitHub Account. You'll need to pick one
711-
at the next step:
689+
Check the emails registered with your GitHub Account. You'll need to pick one on the next step:
712690

713691
```bash
714692
gh api user/emails | jq -r '.[].email'
@@ -722,62 +700,19 @@ cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
722700

723701
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
724702

725-
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command.
726-
If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if
727-
you don't want your email to appear in public repositories you may contribute to.
728-
</details>
729-
730-
731-
OR
732-
733-
<details>
734-
<summary>
735-
<strong>I already attended Web-Dev or Data-Science bootcamp at Le Wagon <em>but not on this VM</em></strong>
736-
</summary>
737-
738-
739-
Open your terminal and run the following command:
703+
:warning: You **need** to put one of the emails listed above from the previous `gh api ...` command.
704+
If you do not enter a valid email, Kitt will not be able to track your progress.
740705

741-
```bash
742-
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
743-
echo $GITHUB_USERNAME
744-
```
745-
746-
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
747-
There seems to be a problem with the previous step (`gh auth`).
748-
749-
Time to fork the repo and clone it on your laptop:
750-
751-
```bash
752-
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
753-
gh repo fork lewagon/dotfiles --clone
754-
```
755-
756-
Run the `dotfiles` installer.
757-
758-
```bash
759-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
760-
```
706+
💡 Select the `...@users.noreply.github.com` address if you don't want your email to appear in public repositories you may contribute to.
761707

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

765-
```bash
766-
gh api user/emails | jq -r '.[].email'
767-
```
709+
---
768710

769-
Run the git installer:
711+
Once you have finished installing the **dotfiles**, kill your terminal (little trash can at the top right of the terminal window) and re-open it. You might have to do it a few times until it looks similar to:
770712

771-
```bash
772-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
773-
```
713+
![](/images/vscode_after_ansible1.png)
774714

775-
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
776-
777-
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command.
778-
If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if
779-
you don't want your email to appear in public repositories you may contribute to.
780-
</details>
715+
The terminal should read as `zsh`.
781716

782717

783718
### zsh default terminal

0 commit comments

Comments
 (0)