From 6744958af390ba5237f4ff2bea94ca85162e0f9a Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Mon, 2 Jul 2018 18:32:31 +0200 Subject: [PATCH 001/127] add ruby linter dotfiles --- Package Control.sublime-settings | 4 +++- SublimeLinter.sublime-settings | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 SublimeLinter.sublime-settings diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index d57940722d..fa008fb25c 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -10,6 +10,8 @@ "Git", "GitGutter", "Package Control", - "SCSS" + "SCSS", + "SublimeLinter", + "SublimeLinter-rubocop" ] } diff --git a/SublimeLinter.sublime-settings b/SublimeLinter.sublime-settings new file mode 100644 index 0000000000..09d9938488 --- /dev/null +++ b/SublimeLinter.sublime-settings @@ -0,0 +1,15 @@ +{ + "paths": { + "linux": [ + "~/.rbenv/shims" + ], + "osx": [ + "~/.rbenv/shims" + ] + }, + "linters": { + "rubocop": { + "args": ["--config", ".rubocop.yml"] + } + } +} From eb2d7b1124acfbcfcd4146c84d4449192d43d96a Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Tue, 3 Jul 2018 10:02:22 +0200 Subject: [PATCH 002/127] add line to symlink prefs to dotfiles --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index de74b134bc..808c4c24f3 100755 --- a/install.sh +++ b/install.sh @@ -58,6 +58,7 @@ backup "$SUBL_PATH/Packages/User/Preferences.sublime-settings" curl -k https://sublime.wbond.net/Package%20Control.sublime-package > $SUBL_PATH/Installed\ Packages/Package\ Control.sublime-package ln -s $PWD/Preferences.sublime-settings $SUBL_PATH/Packages/User/Preferences.sublime-settings ln -s $PWD/Package\ Control.sublime-settings $SUBL_PATH/Packages/User/Package\ Control.sublime-settings +ln -s $PWD/SublimeLinter.sublime-settings $SUBL_PATH/Packages/User/SublimeLinter.sublime-settings zsh ~/.zshrc From bf7d33f6a9fbab8f9b51baa42429ea04cc6ba415 Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Tue, 3 Jul 2018 11:06:55 +0200 Subject: [PATCH 003/127] remove linters config key --- SublimeLinter.sublime-settings | 5 ----- 1 file changed, 5 deletions(-) diff --git a/SublimeLinter.sublime-settings b/SublimeLinter.sublime-settings index 09d9938488..d9f86dcae3 100644 --- a/SublimeLinter.sublime-settings +++ b/SublimeLinter.sublime-settings @@ -6,10 +6,5 @@ "osx": [ "~/.rbenv/shims" ] - }, - "linters": { - "rubocop": { - "args": ["--config", ".rubocop.yml"] - } } } From 332e2c2ea0cc7bff4cebb709e85335c697a5a9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Tue, 1 Jan 2019 10:54:52 +0100 Subject: [PATCH 004/127] Disable GitGutter --- GitGutter.sublime-settings | 4 ++++ Preferences.sublime-settings | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 GitGutter.sublime-settings diff --git a/GitGutter.sublime-settings b/GitGutter.sublime-settings new file mode 100644 index 0000000000..217eb07a4e --- /dev/null +++ b/GitGutter.sublime-settings @@ -0,0 +1,4 @@ +// GitGutter Settings - User +{ + "show_line_annotation": false +} diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index 9ca4b3731c..efeacfd481 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -1,5 +1,4 @@ { - "always_show_minimap_viewport": false, "detect_indentation": false, "draw_white_space": true, "ensure_newline_at_eof_on_save": true, From a6a30c25c47d91a921f20040951240d2b3e27a9f Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Mon, 7 Jan 2019 11:33:54 +0100 Subject: [PATCH 005/127] remove A File Icon --- Package Control.sublime-settings | 1 - 1 file changed, 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index fa008fb25c..f1ebd441ff 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -1,7 +1,6 @@ { "installed_packages": [ - "A File Icon", "AdvancedNewFile", "All Autocomplete", "Babel", From 5cfd7243db12f684055ca2f9b570709ec8a19b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Tue, 15 Jan 2019 16:00:34 +0100 Subject: [PATCH 006/127] Fixes #30 --- gitignore | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 gitignore diff --git a/gitignore b/gitignore deleted file mode 100644 index 5e63edaf8a..0000000000 --- a/gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Mac OSX Finder hidden files -.DS_Store - -# Figaro gem -config/application.yml From b7cee2cf081b916a467a7e695d264b990cd9d56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 7 Apr 2019 19:57:16 +0200 Subject: [PATCH 007/127] Fixes lewagon/setup#94 --- gemrc | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 gemrc diff --git a/gemrc b/gemrc deleted file mode 100644 index 67b77df9a9..0000000000 --- a/gemrc +++ /dev/null @@ -1,9 +0,0 @@ -:update_sources: true -:sources: -- http://gems.rubyforge.org/ -- http://gems.github.com -:benchmark: false -:bulk_threshold: 1000 -:backtrace: false -:verbose: true -gem: --no-document \ No newline at end of file From a481e0566fa2022a693ba87626cf4d04174926b8 Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Thu, 11 Apr 2019 09:32:46 +0200 Subject: [PATCH 008/127] add git plugin to restore gitfast aliases --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 628976071f..7cc1a5735e 100644 --- a/zshrc +++ b/zshrc @@ -5,7 +5,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful plugins for Rails development with Sublime Text -plugins=(gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) +plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) # Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md export HOMEBREW_NO_ANALYTICS=1 From 30be28d9797da4c29a31832c66961ab693c957c2 Mon Sep 17 00:00:00 2001 From: Calvin Tan <6238745+calvintan@users.noreply.github.com> Date: Mon, 17 Jun 2019 13:27:01 +0800 Subject: [PATCH 009/127] Fix typo on Sublime Text setting --- Preferences.sublime-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index efeacfd481..4ad079c9e3 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -35,5 +35,5 @@ "trim_automatic_white_space": true, "trim_trailing_white_space_on_save": true, "use_tab_stops": true, - "wordWrap": false + "word_wrap": false } From b4223c02eda3b9f7dd9a68b06279dc233a4cae29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 6 Oct 2019 09:33:18 +0200 Subject: [PATCH 010/127] Remove gitfast plugin --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 628976071f..8c76bf5b26 100644 --- a/zshrc +++ b/zshrc @@ -5,7 +5,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful plugins for Rails development with Sublime Text -plugins=(gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) +plugins=(last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) # Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md export HOMEBREW_NO_ANALYTICS=1 From 4b4b236fdf0a1af451a5f93b64325dd6e0584223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 6 Oct 2019 09:36:53 +0200 Subject: [PATCH 011/127] NVM + Anaconda in PATH --- zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 8c76bf5b26..4a4c5a24fe 100644 --- a/zshrc +++ b/zshrc @@ -14,10 +14,17 @@ export HOMEBREW_NO_ANALYTICS=1 source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) -# Load rbenv if installed +# Load rbenv if installed (To manage your Ruby versions) export PATH="${HOME}/.rbenv/bin:${PATH}" type -a rbenv > /dev/null && eval "$(rbenv init -)" +# Load nvm if installed (To manage your Node versions) +export NVM_DIR="$HOME/.nvm" +[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" + +# Anaconda binaries (python, pip, conda, jupyter, pytest, pylint etc.) +export PATH="${HOME}/anaconda3/bin:${PATH}" + # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` # Same for `./node_modules/.bin` and nodejs From d072f9ea2f55668162d5b7c25046ac58a148642e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 6 Oct 2019 23:19:20 +0200 Subject: [PATCH 012/127] Latest package install --- GitGutter.sublime-settings | 4 ---- Package Control.sublime-settings | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 GitGutter.sublime-settings diff --git a/GitGutter.sublime-settings b/GitGutter.sublime-settings deleted file mode 100644 index 217eb07a4e..0000000000 --- a/GitGutter.sublime-settings +++ /dev/null @@ -1,4 +0,0 @@ -// GitGutter Settings - User -{ - "show_line_annotation": false -} diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index f1ebd441ff..dc5e152dc8 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -1,13 +1,15 @@ { "installed_packages": [ + "A File Icon", "AdvancedNewFile", "All Autocomplete", "Babel", "Emmet", "ERB Snippets", "Git", - "GitGutter", + "Latest Migration", + "MagicPython", "Package Control", "SCSS", "SublimeLinter", From facb0985feeaaa8b25a4148542dc4ebb515882dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Mon, 7 Oct 2019 11:55:38 +0200 Subject: [PATCH 013/127] Anaconda prompt --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 3471ab3c62..f0fe73a42e 100644 --- a/zshrc +++ b/zshrc @@ -23,7 +23,7 @@ export NVM_DIR="$HOME/.nvm" [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # Anaconda binaries (python, pip, conda, jupyter, pytest, pylint etc.) -export PATH="${HOME}/anaconda3/bin:${PATH}" +export PATH="/anaconda3/bin:${HOME}/anaconda3/bin:${PATH}" # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` From ec927a72a3cc6c602c40eec74558055847c305f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sat, 11 Jan 2020 12:41:35 +0100 Subject: [PATCH 014/127] Prepare setup for Data Bootcamp (pyenv / virtualenv). Should not conflict with Web Bootcamp --- zshrc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/zshrc b/zshrc index f0fe73a42e..6d36efa6d4 100644 --- a/zshrc +++ b/zshrc @@ -1,13 +1,12 @@ ZSH=$HOME/.oh-my-zsh -# You can change the theme with another one: -# https://github.com/robbyrussell/oh-my-zsh/wiki/themes +# You can change the theme with another one from https://github.com/robbyrussell/oh-my-zsh/wiki/themes ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) -# Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md +# (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md export HOMEBREW_NO_ANALYTICS=1 # Actually load Oh-My-Zsh @@ -15,21 +14,24 @@ source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) # Load rbenv if installed (To manage your Ruby versions) -export PATH="${HOME}/.rbenv/bin:${PATH}" type -a rbenv > /dev/null && eval "$(rbenv init -)" +# Load pyenv (To manage your Python versions) +type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" + # Load nvm if installed (To manage your Node versions) export NVM_DIR="$HOME/.nvm" [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" -# Anaconda binaries (python, pip, conda, jupyter, pytest, pylint etc.) -export PATH="/anaconda3/bin:${HOME}/anaconda3/bin:${PATH}" - # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` # Same for `./node_modules/.bin` and nodejs export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" +# Load 'lewagon' virtualenv for the Data Bootcamp. You can comment these 2 lines to disable this behavior. +export PYENV_VIRTUALENV_DISABLE_PROMPT=1 +pyenv activate lewagon 2>/dev/null && echo "🐍 Loading 'lewagon' virtualenv" + # Store your own aliases in the ~/.aliases file and load the here. [[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases" From 97dc215852629c24f67badf7c1f2bad0d985abe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sat, 11 Jan 2020 22:38:24 +0100 Subject: [PATCH 015/127] Fix rbenv + pyenv on Linux --- zshrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zshrc b/zshrc index 6d36efa6d4..9fb47f1c79 100644 --- a/zshrc +++ b/zshrc @@ -14,9 +14,11 @@ source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) # Load rbenv if installed (To manage your Ruby versions) +export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (To manage your Python versions) +export PATH="${HOME}/.pyenv/bin:${PATH}" # Needed for Linux/WSL type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" # Load nvm if installed (To manage your Node versions) From efb51d3976206dfc87a887b024077c5806241829 Mon Sep 17 00:00:00 2001 From: Prima Aulia Gusta Date: Sat, 14 Mar 2020 17:04:53 +0800 Subject: [PATCH 016/127] add `BracketHighlighter` as default setup pack More and more student is having unnecessary error for not closing their brackets, this additional package can help them to notice them easily --- Package Control.sublime-settings | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index dc5e152dc8..54921c6dbb 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -13,6 +13,7 @@ "Package Control", "SCSS", "SublimeLinter", - "SublimeLinter-rubocop" + "SublimeLinter-rubocop", + "BracketHighlighter" ] } From 0a0c6fb06097e0079b92b45d046974896cdaa548 Mon Sep 17 00:00:00 2001 From: Prima Aulia Gusta Date: Sat, 18 Apr 2020 09:57:17 +0800 Subject: [PATCH 017/127] Update Package Control.sublime-settings add `ColorHighlight` as one one of the default package --- Package Control.sublime-settings | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index 54921c6dbb..e0f4955f0c 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -14,6 +14,7 @@ "SCSS", "SublimeLinter", "SublimeLinter-rubocop", - "BracketHighlighter" + "BracketHighlighter", + "ColorHighlight" ] } From fe2b96c79bbcde5ba24b3bbdd64aceaef76cf1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Mon, 25 May 2020 22:59:38 +0200 Subject: [PATCH 018/127] Change default aliases Fixes #58 Fixes #41 --- aliases | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/aliases b/aliases index be30c64bc0..bc42ac69c8 100644 --- a/aliases +++ b/aliases @@ -1,7 +1,6 @@ -# Get External IP / local IPs -alias ip="curl ipinfo.io/ip" -alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'" -alias speedtest="wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip" +# Get External IP / Internet Speed +alias myip="curl https://ipinfo.io/json" # or /ip for plain-text ip +alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -" # Quickly serve the current directory as HTTP -alias serve='ruby -run -e httpd . -p 8000' # Or python -m SimpleHTTPServer :) +alias serve='ruby -run -e httpd . -p 8000' # Or python -m SimpleHTTPServer :) From f61c1fd774f957c3aa47fe23612a922079b13683 Mon Sep 17 00:00:00 2001 From: Damien Milon Date: Tue, 30 Jun 2020 09:48:08 +0200 Subject: [PATCH 019/127] Fix color highlight package --- Package Control.sublime-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index e0f4955f0c..129095560e 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -15,6 +15,6 @@ "SublimeLinter", "SublimeLinter-rubocop", "BracketHighlighter", - "ColorHighlight" + "Color Highlight" ] } From acfcea49ac2481976daa13cdf37da279ede2455d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 2 Jul 2020 11:03:32 +0800 Subject: [PATCH 020/127] Update zshrc comment the old homebrew analytics url is 404 --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 9fb47f1c79..e47b8826d5 100644 --- a/zshrc +++ b/zshrc @@ -6,7 +6,7 @@ ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) -# (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md +# (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 # Actually load Oh-My-Zsh From dd1f4e88457e624ed1d5c4384498720ff26aa4dd Mon Sep 17 00:00:00 2001 From: kevin robert Date: Wed, 8 Jul 2020 12:34:35 +0200 Subject: [PATCH 021/127] ignore Python --- Preferences.sublime-settings | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index fd8321e082..5361ad6491 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -26,7 +26,8 @@ "hot_exit": false, "ignored_packages": [ - "Vintage" + "Vintage", + "Python" ], "remember_open_files": false, "rulers": From 6011a65798eaf54628aae8568ef5a0ce9ea79c7f Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 20 Nov 2020 12:06:45 +0100 Subject: [PATCH 022/127] update nvm load --- zshrc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/zshrc b/zshrc index e47b8826d5..4c89a60880 100644 --- a/zshrc +++ b/zshrc @@ -13,17 +13,40 @@ export HOMEBREW_NO_ANALYTICS=1 source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) -# Load rbenv if installed (To manage your Ruby versions) +# Load rbenv if installed (to manage your Ruby versions) export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" -# Load pyenv (To manage your Python versions) +# Load pyenv (to manage your Python versions) export PATH="${HOME}/.pyenv/bin:${PATH}" # Needed for Linux/WSL type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" -# Load nvm if installed (To manage your Node versions) +# Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" -[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" +[ -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 + +# Call nvm use automatically in a directory with a .nvmrc file +autoload -U add-zsh-hook +load-nvmrc() { + local node_version="$(nvm version)" + local nvmrc_path="$(nvm_find_nvmrc)" + + if [ -n "$nvmrc_path" ]; then + local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") + + if [ "$nvmrc_node_version" = "N/A" ]; then + nvm install + elif [ "$nvmrc_node_version" != "$node_version" ]; then + nvm use + fi + elif [ "$node_version" != "$(nvm version default)" ]; then + echo "Reverting to nvm default version" + nvm use default + fi +} +add-zsh-hook chpwd load-nvmrc +load-nvmrc # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` From 62ff172d0c9d5119cd9d3730884f464e2b520672 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 23 Nov 2020 10:22:07 +0100 Subject: [PATCH 023/127] silence nvm to remove unecesary stdout --- zshrc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zshrc b/zshrc index 4c89a60880..70f9717fe2 100644 --- a/zshrc +++ b/zshrc @@ -26,7 +26,7 @@ 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 -# Call nvm use automatically in a directory with a .nvmrc file +# Call `nvm use` automatically in a directory with a `.nvmrc` file autoload -U add-zsh-hook load-nvmrc() { local node_version="$(nvm version)" @@ -38,11 +38,10 @@ load-nvmrc() { if [ "$nvmrc_node_version" = "N/A" ]; then nvm install elif [ "$nvmrc_node_version" != "$node_version" ]; then - nvm use + nvm use --silent fi elif [ "$node_version" != "$(nvm version default)" ]; then - echo "Reverting to nvm default version" - nvm use default + nvm use default --silent fi } add-zsh-hook chpwd load-nvmrc From 4d3aa9033c29110f2a1d95b447d252ad024d92d6 Mon Sep 17 00:00:00 2001 From: Lomig Enfroy Date: Wed, 2 Dec 2020 09:09:03 +0100 Subject: [PATCH 024/127] Add default pull reconciliation strategy for git --- gitconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitconfig b/gitconfig index 33e7c62aff..78d1401b09 100644 --- a/gitconfig +++ b/gitconfig @@ -45,3 +45,6 @@ [branch "master"] mergeoptions = --no-edit + +[pull] + rebase = false From 28e84464fc25ab19e95d133881768f707b541269 Mon Sep 17 00:00:00 2001 From: kevin robert Date: Wed, 30 Dec 2020 18:38:44 +0100 Subject: [PATCH 025/127] remove virtualenv auto-loading --- zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 70f9717fe2..8460a4320c 100644 --- a/zshrc +++ b/zshrc @@ -52,9 +52,8 @@ load-nvmrc # Same for `./node_modules/.bin` and nodejs export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" -# Load 'lewagon' virtualenv for the Data Bootcamp. You can comment these 2 lines to disable this behavior. +# Hide virtualenv for the Data Bootcamp export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -pyenv activate lewagon 2>/dev/null && echo "🐍 Loading 'lewagon' virtualenv" # Store your own aliases in the ~/.aliases file and load the here. [[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases" From 6fe767fac7a44e5923ee4d2ce112d4ae1bd601c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Thu, 31 Dec 2020 11:04:41 +0100 Subject: [PATCH 026/127] Disable PYENV_VIRTUALENV_DISABLE_PROMPT --- zshrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/zshrc b/zshrc index 8460a4320c..3fd2fc0346 100644 --- a/zshrc +++ b/zshrc @@ -52,9 +52,6 @@ load-nvmrc # Same for `./node_modules/.bin` and nodejs export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" -# Hide virtualenv for the Data Bootcamp -export PYENV_VIRTUALENV_DISABLE_PROMPT=1 - # Store your own aliases in the ~/.aliases file and load the here. [[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases" From 528adc6cf0876a8af63b75590ddd8e8204e3e902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Thu, 31 Dec 2020 12:08:02 +0100 Subject: [PATCH 027/127] Add Python activated environment to the right prompt --- zshrc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/zshrc b/zshrc index 8460a4320c..fdee631026 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps -plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) +plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search pyenv) # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 @@ -19,7 +19,8 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PATH="${HOME}/.pyenv/bin:${PATH}" # Needed for Linux/WSL -type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" +export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # https://github.com/pyenv/pyenv-virtualenv/issues/135 +type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" @@ -52,9 +53,6 @@ load-nvmrc # Same for `./node_modules/.bin` and nodejs export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" -# Hide virtualenv for the Data Bootcamp -export PYENV_VIRTUALENV_DISABLE_PROMPT=1 - # Store your own aliases in the ~/.aliases file and load the here. [[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases" From 00b400cd4b07d48259a9280e00bd1f4b2dc3cae9 Mon Sep 17 00:00:00 2001 From: kevin robert Date: Thu, 31 Dec 2020 13:38:29 +0100 Subject: [PATCH 028/127] add anaconda package to sublime text --- Anaconda.sublime-settings | 3 +++ Package Control.sublime-settings | 3 ++- install.sh | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 Anaconda.sublime-settings diff --git a/Anaconda.sublime-settings b/Anaconda.sublime-settings new file mode 100644 index 0000000000..83151c627a --- /dev/null +++ b/Anaconda.sublime-settings @@ -0,0 +1,3 @@ +{ + "anaconda_linting": false +} diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index 129095560e..d34c7583cb 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -15,6 +15,7 @@ "SublimeLinter", "SublimeLinter-rubocop", "BracketHighlighter", - "Color Highlight" + "Color Highlight", + "Anaconda" ] } diff --git a/install.sh b/install.sh index 808c4c24f3..bfcd3f8b3f 100755 --- a/install.sh +++ b/install.sh @@ -59,6 +59,7 @@ curl -k https://sublime.wbond.net/Package%20Control.sublime-package > $SUBL_PATH ln -s $PWD/Preferences.sublime-settings $SUBL_PATH/Packages/User/Preferences.sublime-settings ln -s $PWD/Package\ Control.sublime-settings $SUBL_PATH/Packages/User/Package\ Control.sublime-settings ln -s $PWD/SublimeLinter.sublime-settings $SUBL_PATH/Packages/User/SublimeLinter.sublime-settings +ln -s $PWD/Anaconda.sublime-settings $SUBL_PATH/Packages/User/Anaconda.sublime-settings zsh ~/.zshrc From d206cd7b78903707faac9cd6913d934e4da3ac2f Mon Sep 17 00:00:00 2001 From: kevin robert Date: Thu, 31 Dec 2020 13:53:30 +0100 Subject: [PATCH 029/127] add flake8 linter and AutoPEP8 formatter --- Package Control.sublime-settings | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index 129095560e..ce8b2968c5 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -15,6 +15,8 @@ "SublimeLinter", "SublimeLinter-rubocop", "BracketHighlighter", - "Color Highlight" + "Color Highlight", + "SublimeLinter-flake8", + "AutoPEP8" ] } From 8063c92be4f7f4f94d11ed88c1c666d2557ba03b Mon Sep 17 00:00:00 2001 From: Julien Da Silva Date: Tue, 5 Jan 2021 10:43:28 +0100 Subject: [PATCH 030/127] git clone zsh autosuggestions --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index bfcd3f8b3f..d6441f2f40 100755 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins" mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR" if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..." + git clone https://github.com/zsh-users/zsh-autosuggestions git clone git://github.com/zsh-users/zsh-syntax-highlighting.git fi cd "$CURRENT_DIR" From 377dd935f3374fe527369241fa2ba992c45ff7c1 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Sat, 9 Jan 2021 15:09:58 +0100 Subject: [PATCH 031/127] sort sublime package list --- Package Control.sublime-settings | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index e8b9ffbd05..89ab9aa981 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -4,7 +4,11 @@ "A File Icon", "AdvancedNewFile", "All Autocomplete", + "Anaconda" + "AutoPEP8", "Babel", + "BracketHighlighter", + "Color Highlight", "Emmet", "ERB Snippets", "Git", @@ -13,11 +17,7 @@ "Package Control", "SCSS", "SublimeLinter", - "SublimeLinter-rubocop", - "BracketHighlighter", - "Color Highlight", "SublimeLinter-flake8", - "AutoPEP8", - "Anaconda" + "SublimeLinter-rubocop" ] } From 40042bdcaec03286a332d2a3eaa55f6277c89d82 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 11 Jan 2021 08:06:56 +0100 Subject: [PATCH 032/127] update nvm path --- zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index fdee631026..9a7b359ecf 100644 --- a/zshrc +++ b/zshrc @@ -23,7 +23,14 @@ export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # https://github.com/pyenv/pyenv-virtua type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' # Load nvm (to manage your node versions) -export NVM_DIR="$HOME/.nvm" +if [ "$(uname 2> /dev/null)" != "Linux" ] +then + # nvm bin path for macOS + export NVM_DIR="$HOME//usr/local/opt/nvm" +else + # nvm bin path for Linux + export NVM_DIR="$HOME/.nvm" +fi [ -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 From ecf05233a043db17577cbe2fdbc0e5c060cca29d Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 11 Jan 2021 10:04:34 +0100 Subject: [PATCH 033/127] reverting to usual NVM dir --- zshrc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/zshrc b/zshrc index 9a7b359ecf..fdee631026 100644 --- a/zshrc +++ b/zshrc @@ -23,14 +23,7 @@ export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # https://github.com/pyenv/pyenv-virtua type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' # Load nvm (to manage your node versions) -if [ "$(uname 2> /dev/null)" != "Linux" ] -then - # nvm bin path for macOS - export NVM_DIR="$HOME//usr/local/opt/nvm" -else - # nvm bin path for Linux - export NVM_DIR="$HOME/.nvm" -fi +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 From b6bb2a38f12f1bcc7185389f277e57dd57f1fd93 Mon Sep 17 00:00:00 2001 From: ElvisDot <43215015+ElvisDot@users.noreply.github.com> Date: Mon, 11 Jan 2021 11:55:38 +0100 Subject: [PATCH 034/127] Fix missing comma in stt packlist --- Package Control.sublime-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings index 89ab9aa981..ddcdc4b199 100644 --- a/Package Control.sublime-settings +++ b/Package Control.sublime-settings @@ -4,7 +4,7 @@ "A File Icon", "AdvancedNewFile", "All Autocomplete", - "Anaconda" + "Anaconda", "AutoPEP8", "Babel", "BracketHighlighter", From a5419c53858c60d0e803d8ad54ab585e93047ec0 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 9 Mar 2021 16:09:40 +0100 Subject: [PATCH 035/127] load only if nvm is installed --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index fdee631026..e7bd7d3550 100644 --- a/zshrc +++ b/zshrc @@ -45,8 +45,8 @@ load-nvmrc() { nvm use default --silent fi } -add-zsh-hook chpwd load-nvmrc -load-nvmrc +type -a nvm > /dev/null && add-zsh-hook chpwd load-nvmrc +type -a nvm > /dev/null && load-nvmrc # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` From 266faefdd44146d24ea16e3954372ea04f3445fc Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Wed, 31 Mar 2021 17:32:27 +0200 Subject: [PATCH 036/127] add vscode settings --- vscode_settings.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vscode_settings.json diff --git a/vscode_settings.json b/vscode_settings.json new file mode 100644 index 0000000000..4334ca8f16 --- /dev/null +++ b/vscode_settings.json @@ -0,0 +1,22 @@ +{ + "emmet.triggerExpansionOnTab": true, + "emmet.includeLanguages": { + "erb": "html" + }, + "editor.detectIndentation": false, + "files.insertFinalNewline": true, + "files.hotExit": "off", + "editor.tabSize": 2, + "editor.trimAutoWhitespace": true, + "files.trimTrailingWhitespace": true, + "editor.useTabStops": true, + "editor.wordWrap": "on", + "editor.formatOnPaste": true, + "editor.multiCursorModifier": "ctrlCmd", + "editor.snippetSuggestions": "top", + "workbench.startupEditor": "newUntitledFile", + "editor.minimap.enabled": false, + "breadcrumbs.enabled": true, + "editor.renderControlCharacters": true, + "workbench.colorTheme": "Monokai" +} From 0c7a16a34eaeeaf961659e29c666bd87dc43566e Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 1 Apr 2021 16:57:56 +0200 Subject: [PATCH 037/127] updating install.sh --- Package Control.sublime-settings | 20 --------------- Preferences.sublime-settings | 43 -------------------------------- README.md | 2 +- SublimeLinter.sublime-settings | 10 -------- install.sh | 4 +-- zshrc | 2 +- 6 files changed, 4 insertions(+), 77 deletions(-) delete mode 100644 Package Control.sublime-settings delete mode 100644 Preferences.sublime-settings delete mode 100644 SublimeLinter.sublime-settings diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings deleted file mode 100644 index 129095560e..0000000000 --- a/Package Control.sublime-settings +++ /dev/null @@ -1,20 +0,0 @@ -{ - "installed_packages": - [ - "A File Icon", - "AdvancedNewFile", - "All Autocomplete", - "Babel", - "Emmet", - "ERB Snippets", - "Git", - "Latest Migration", - "MagicPython", - "Package Control", - "SCSS", - "SublimeLinter", - "SublimeLinter-rubocop", - "BracketHighlighter", - "Color Highlight" - ] -} diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings deleted file mode 100644 index 5361ad6491..0000000000 --- a/Preferences.sublime-settings +++ /dev/null @@ -1,43 +0,0 @@ -{ - "detect_indentation": false, - "draw_white_space": true, - "ensure_newline_at_eof_on_save": true, - "update_check": false, - "folder_exclude_patterns": - [ - "tmp", - "log", - ".git", - ".svn", - "_site", - ".bundle", - ".sass-cache", - ".asset-cache", - "build", - "node_modules", - "dist", - "public/packs", - "coverage", - ".ipynb_checkpoints", - ".pytest_cache", - "__pycache__" - ], - "highlight_modified_tabs": true, - "hot_exit": false, - "ignored_packages": - [ - "Vintage", - "Python" - ], - "remember_open_files": false, - "rulers": - [ - 80 - ], - "tab_size": 2, - "translate_tabs_to_spaces": true, - "trim_automatic_white_space": true, - "trim_trailing_white_space_on_save": true, - "use_tab_stops": true, - "word_wrap": false -} diff --git a/README.md b/README.md index 1d7297e2c1..81baf4fbc9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ This repository is used by [Le Wagon](https://www.lewagon.com) students during o ## Toolset - [oh-my-zsh](http://ohmyz.sh/) -- [Sublime Text](https://www.sublimetext.com/) +- [Visual Studio Code](https://code.visualstudio.com/) - [git](https://git-scm.com/) - Ruby via [`rbenv`](https://github.com/rbenv/rbenv) diff --git a/SublimeLinter.sublime-settings b/SublimeLinter.sublime-settings deleted file mode 100644 index d9f86dcae3..0000000000 --- a/SublimeLinter.sublime-settings +++ /dev/null @@ -1,10 +0,0 @@ -{ - "paths": { - "linux": [ - "~/.rbenv/shims" - ], - "osx": [ - "~/.rbenv/shims" - ] - } -} diff --git a/install.sh b/install.sh index 808c4c24f3..aece7cc261 100755 --- a/install.sh +++ b/install.sh @@ -39,8 +39,8 @@ cd "$CURRENT_DIR" setopt nocasematch if [[ ! `uname` =~ "darwin" ]]; then - git config --global core.editor "subl -n -w $@ >/dev/null 2>&1" - echo 'export BUNDLER_EDITOR="subl $@ >/dev/null 2>&1 -a"' >> zshrc + git config --global core.editor "code -n -w $@ >/dev/null 2>&1" + echo 'export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a"' >> zshrc else git config --global core.editor "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -n -w" bundler_editor="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'" diff --git a/zshrc b/zshrc index 3fd2fc0346..d447ef749c 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps -plugins=(git gitfast last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search) +plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search) # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 From 8c66ffcb6a9d0c0495bb8608a747118f93b023f2 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:08:11 +0200 Subject: [PATCH 038/127] remove package control --- install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index aece7cc261..385a6198d5 100755 --- a/install.sh +++ b/install.sh @@ -42,22 +42,20 @@ if [[ ! `uname` =~ "darwin" ]]; then git config --global core.editor "code -n -w $@ >/dev/null 2>&1" echo 'export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a"' >> zshrc else - git config --global core.editor "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -n -w" - bundler_editor="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'" + git config --global core.editor "'/usr/local/bin/code' -n -w" + bundler_editor="'/usr/local/bin/code'" echo "export BUNDLER_EDITOR=\"${bundler_editor} -a\"" >> zshrc fi # Sublime Text if [[ ! `uname` =~ "darwin" ]]; then - SUBL_PATH=~/.config/sublime-text-3 + CODE_PATH=~/.config/Code/User else - SUBL_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 + CODE_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 fi -mkdir -p $SUBL_PATH/Packages/User $SUBL_PATH/Installed\ Packages -backup "$SUBL_PATH/Packages/User/Preferences.sublime-settings" -curl -k https://sublime.wbond.net/Package%20Control.sublime-package > $SUBL_PATH/Installed\ Packages/Package\ Control.sublime-package -ln -s $PWD/Preferences.sublime-settings $SUBL_PATH/Packages/User/Preferences.sublime-settings -ln -s $PWD/Package\ Control.sublime-settings $SUBL_PATH/Packages/User/Package\ Control.sublime-settings +mkdir -p $CODE_PATH/Packages/User $CODE_PATH/Installed\ Packages +backup "$CODE_PATH/settings.json" +ln -s $PWD/vscode_settings.json $CODE_PATH/settings.json ln -s $PWD/SublimeLinter.sublime-settings $SUBL_PATH/Packages/User/SublimeLinter.sublime-settings zsh ~/.zshrc From b56de439608b4b4deddf64198d6117b5bab855e5 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:09:59 +0200 Subject: [PATCH 039/127] remove sublime linter sublime settings --- install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install.sh b/install.sh index 385a6198d5..7f3bf3957c 100755 --- a/install.sh +++ b/install.sh @@ -56,7 +56,6 @@ fi mkdir -p $CODE_PATH/Packages/User $CODE_PATH/Installed\ Packages backup "$CODE_PATH/settings.json" ln -s $PWD/vscode_settings.json $CODE_PATH/settings.json -ln -s $PWD/SublimeLinter.sublime-settings $SUBL_PATH/Packages/User/SublimeLinter.sublime-settings zsh ~/.zshrc From 7833fdc6a10d096d8345b01488de185e4bc10abc Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:20:27 +0200 Subject: [PATCH 040/127] update install.sh --- aliases | 3 +++ install.sh | 7 +++---- vscode_settings.json | 2 +- zshrc | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/aliases b/aliases index bc42ac69c8..9c96c035ec 100644 --- a/aliases +++ b/aliases @@ -4,3 +4,6 @@ alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/m # Quickly serve the current directory as HTTP alias serve='ruby -run -e httpd . -p 8000' # Or python -m SimpleHTTPServer :) + +# NOTE: On Q2 2021, Le Wagon decided to change the Web Dev curriculum default text editor +alias stt="echo 'Launching VS Code instead of Sublime Text... (cf ~/.aliases)' && code ." diff --git a/install.sh b/install.sh index 7f3bf3957c..36aecbb565 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ backup() { for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" - if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ ! "$name" =~ '\.sublime-settings$' ]]; then + if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ ! "$name" != 'vscode_settings.json' ]]; then backup $target if [ ! -e "$target" ]; then @@ -47,14 +47,13 @@ else echo "export BUNDLER_EDITOR=\"${bundler_editor} -a\"" >> zshrc fi -# Sublime Text +# VS Code if [[ ! `uname` =~ "darwin" ]]; then CODE_PATH=~/.config/Code/User else - CODE_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 + CODE_PATH=~/Library/Application\ Support/Code/User/settings.json fi mkdir -p $CODE_PATH/Packages/User $CODE_PATH/Installed\ Packages -backup "$CODE_PATH/settings.json" ln -s $PWD/vscode_settings.json $CODE_PATH/settings.json zsh ~/.zshrc diff --git a/vscode_settings.json b/vscode_settings.json index 4334ca8f16..16e1ada727 100644 --- a/vscode_settings.json +++ b/vscode_settings.json @@ -18,5 +18,5 @@ "editor.minimap.enabled": false, "breadcrumbs.enabled": true, "editor.renderControlCharacters": true, - "workbench.colorTheme": "Monokai" + "workbench.colorTheme": "Solarized Light" } diff --git a/zshrc b/zshrc index d447ef749c..d46d0a3663 100644 --- a/zshrc +++ b/zshrc @@ -58,3 +58,5 @@ export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" # Encoding stuff for the terminal export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 +export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a" +export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a" From b770cf2704e0c992c2934e8f928830da83d56d24 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 2 Apr 2021 08:52:26 +0200 Subject: [PATCH 041/127] fix bug and restore backup command of vscode settings --- README.md | 2 +- install.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81baf4fbc9..37f2ba87d0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This repository is used by [Le Wagon](https://www.lewagon.com) students during our 9-week [coding bootcamp](https://www.lewagon.com). +This repository is used by [Le Wagon](https://www.lewagon.com) Web Development course students. ## Toolset diff --git a/install.sh b/install.sh index 36aecbb565..2f9ac3e074 100755 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins" mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR" if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..." + git clone https://github.com/zsh-users/zsh-autosuggestions git clone git://github.com/zsh-users/zsh-syntax-highlighting.git fi cd "$CURRENT_DIR" @@ -51,9 +52,9 @@ fi if [[ ! `uname` =~ "darwin" ]]; then CODE_PATH=~/.config/Code/User else - CODE_PATH=~/Library/Application\ Support/Code/User/settings.json + CODE_PATH=~/Library/Application\ Support/Code/User fi -mkdir -p $CODE_PATH/Packages/User $CODE_PATH/Installed\ Packages +backup "$CODE_PATH/settings.json" ln -s $PWD/vscode_settings.json $CODE_PATH/settings.json zsh ~/.zshrc From c80f17ea78a8fc276a52e271f0652eba2f58f683 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 2 Apr 2021 09:01:47 +0200 Subject: [PATCH 042/127] override existing symlink --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2f9ac3e074..4a6b155a08 100755 --- a/install.sh +++ b/install.sh @@ -55,7 +55,7 @@ else CODE_PATH=~/Library/Application\ Support/Code/User fi backup "$CODE_PATH/settings.json" -ln -s $PWD/vscode_settings.json $CODE_PATH/settings.json +ln -sf $PWD/vscode_settings.json $CODE_PATH/settings.json zsh ~/.zshrc From 58307e833d6d4442cd157ff5749cf953daa8a5b8 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 2 Apr 2021 09:09:32 +0200 Subject: [PATCH 043/127] exclude vscode settings from home symlinks --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4a6b155a08..795bd418bf 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ backup() { for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" - if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ ! "$name" != 'vscode_settings.json' ]]; then + if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'vscode_settings.json' ]]; then backup $target if [ ! -e "$target" ]; then From 148223ba1a0288603df3b324cb5096fab39b4946 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 2 Apr 2021 10:01:53 +0200 Subject: [PATCH 044/127] update vscode_settings.json --- vscode_settings.json | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/vscode_settings.json b/vscode_settings.json index 16e1ada727..54c68d773c 100644 --- a/vscode_settings.json +++ b/vscode_settings.json @@ -3,20 +3,39 @@ "emmet.includeLanguages": { "erb": "html" }, + "editor.renderWhitespace": "all", "editor.detectIndentation": false, "files.insertFinalNewline": true, + "files.exclude": { + "tmp": true, + "log": true, + ".git": true, + ".svn": true, + "_site": true, + ".bundle": true, + ".sass-cache": true, + ".asset-cache": true, + "build": true, + "node_modules": true, + "dist": true, + "public/packs": true, + "coverage": true, + ".ipynb_checkpoints": true, + ".pytest_cache": true, + "__pycache__": true + }, "files.hotExit": "off", + "window.restoreWindows": "none", + "editor.rulers": [80], "editor.tabSize": 2, "editor.trimAutoWhitespace": true, "files.trimTrailingWhitespace": true, "editor.useTabStops": true, "editor.wordWrap": "on", - "editor.formatOnPaste": true, "editor.multiCursorModifier": "ctrlCmd", "editor.snippetSuggestions": "top", - "workbench.startupEditor": "newUntitledFile", "editor.minimap.enabled": false, "breadcrumbs.enabled": true, "editor.renderControlCharacters": true, - "workbench.colorTheme": "Solarized Light" + "workbench.colorTheme": "Monokai" } From ace6f33928a16574a8009a0be46956f13315607b Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Sat, 3 Apr 2021 12:51:09 +0200 Subject: [PATCH 045/127] restore zshrc options --- zshrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index d46d0a3663..989867874c 100644 --- a/zshrc +++ b/zshrc @@ -52,11 +52,12 @@ load-nvmrc # Same for `./node_modules/.bin` and nodejs export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin" +# Hide virtualenv for the Data Bootcamp +export PYENV_VIRTUALENV_DISABLE_PROMPT=1 + # Store your own aliases in the ~/.aliases file and load the here. [[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases" # Encoding stuff for the terminal export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 -export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a" -export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a" From 88073e7660de2f0a3760cea89646826ff105d78e Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Sat, 3 Apr 2021 15:16:48 +0200 Subject: [PATCH 046/127] update vscode settings --- vscode_settings.json | 85 ++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/vscode_settings.json b/vscode_settings.json index 54c68d773c..657e3ccf84 100644 --- a/vscode_settings.json +++ b/vscode_settings.json @@ -1,41 +1,48 @@ { - "emmet.triggerExpansionOnTab": true, - "emmet.includeLanguages": { - "erb": "html" - }, - "editor.renderWhitespace": "all", - "editor.detectIndentation": false, - "files.insertFinalNewline": true, - "files.exclude": { - "tmp": true, - "log": true, - ".git": true, - ".svn": true, - "_site": true, - ".bundle": true, - ".sass-cache": true, - ".asset-cache": true, - "build": true, - "node_modules": true, - "dist": true, - "public/packs": true, - "coverage": true, - ".ipynb_checkpoints": true, - ".pytest_cache": true, - "__pycache__": true - }, - "files.hotExit": "off", - "window.restoreWindows": "none", - "editor.rulers": [80], - "editor.tabSize": 2, - "editor.trimAutoWhitespace": true, - "files.trimTrailingWhitespace": true, - "editor.useTabStops": true, - "editor.wordWrap": "on", - "editor.multiCursorModifier": "ctrlCmd", - "editor.snippetSuggestions": "top", - "editor.minimap.enabled": false, - "breadcrumbs.enabled": true, - "editor.renderControlCharacters": true, - "workbench.colorTheme": "Monokai" + "breadcrumbs.enabled": true, + "editor.detectIndentation": false, + "editor.formatOnPaste": true, + "editor.minimap.enabled": false, + "editor.multiCursorModifier": "ctrlCmd", + "editor.renderControlCharacters": true, + "editor.renderWhitespace": "all", + "editor.rulers": [ + 80 + ], + "editor.snippetSuggestions": "top", + "editor.tabSize": 2, + "editor.trimAutoWhitespace": true, + "editor.useTabStops": true, + "editor.wordWrap": "on", + "emmet.includeLanguages": { + "erb": "html" + }, + "emmet.triggerExpansionOnTab": true, + "files.exclude": { + ".asset-cache": true, + ".bundle": true, + ".git": true, + ".ipynb_checkpoints": true, + ".pytest_cache": true, + ".sass-cache": true, + ".svn": true, + "__pycache__": true, + "_site": true, + "build": true, + "coverage": true, + "dist": true, + "log": true, + "node_modules": true, + "public/packs": true, + "tmp": true + }, + "files.hotExit": "off", + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "window.restoreWindows": "none", + "workbench.colorTheme": "Monokai", + "workbench.settings.editor": "json", + "workbench.settings.openDefaultSettings": true, + "workbench.settings.useSplitJSON": true, + "workbench.startupEditor": "newUntitledFile" } From 159d33cc7eb0c55791ed4d273bf2a71edb7afaae Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 5 Apr 2021 08:46:32 +0200 Subject: [PATCH 047/127] add disable git to vscode settings --- vscode_settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/vscode_settings.json b/vscode_settings.json index 657e3ccf84..769d07884d 100644 --- a/vscode_settings.json +++ b/vscode_settings.json @@ -39,6 +39,7 @@ "files.hotExit": "off", "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, + "git.enabled": false, "window.restoreWindows": "none", "workbench.colorTheme": "Monokai", "workbench.settings.editor": "json", From c288f20c9d51374e250ee2c3ffdeee3f390303a5 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 5 Apr 2021 12:58:58 +0200 Subject: [PATCH 048/127] replace syntax highlighting extension protocol --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 795bd418bf..a501731c70 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,7 @@ mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR" if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..." git clone https://github.com/zsh-users/zsh-autosuggestions - git clone git://github.com/zsh-users/zsh-syntax-highlighting.git + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git fi cd "$CURRENT_DIR" From a89b7551b33302a65ffd37cc328ee287d6b7df0c Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 5 Apr 2021 17:35:16 +0200 Subject: [PATCH 049/127] remove .git extension --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a501731c70..b190f895fc 100755 --- a/install.sh +++ b/install.sh @@ -34,7 +34,7 @@ mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR" if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..." git clone https://github.com/zsh-users/zsh-autosuggestions - git clone https://github.com/zsh-users/zsh-syntax-highlighting.git + git clone https://github.com/zsh-users/zsh-syntax-highlighting fi cd "$CURRENT_DIR" From 5cf33acc70681f5af6258407a1fd8ba922e87f98 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 6 Apr 2021 13:14:33 +0200 Subject: [PATCH 050/127] add ssh passphrase config file --- config | 4 ++++ install.sh | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 config diff --git a/config b/config new file mode 100644 index 0000000000..d8a05bec15 --- /dev/null +++ b/config @@ -0,0 +1,4 @@ +Host * + IgnoreUnknown AddKeysToAgent,UseKeychain + AddKeysToAgent yes + UseKeychain yes diff --git a/install.sh b/install.sh index b190f895fc..68f50f7aba 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ backup() { for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" - if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'vscode_settings.json' ]]; then + if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'vscode_settings.json' ]] && [[ "$name" != 'config' ]]; then backup $target if [ ! -e "$target" ]; then @@ -23,10 +23,6 @@ for name in *; do fi done -REGULAR="\\033[0;39m" -YELLOW="\\033[1;33m" -GREEN="\\033[1;32m" - # zsh plugins CURRENT_DIR=`pwd` ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins" @@ -60,3 +56,9 @@ ln -sf $PWD/vscode_settings.json $CODE_PATH/settings.json zsh ~/.zshrc echo "👌 Carry on with git setup!" + +# SSH passphrase config +if [[ `uname` =~ "darwin" ]]; then + backup ~/.ssh/config + ln -sf $PWD/config ~/.ssh/config +fi From f62be17f9206017733526353f4de3295fb15c0a4 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:48:13 +0200 Subject: [PATCH 051/127] adding a new dotfile for ssh passphrase management on macos --- install.sh | 15 ++++----------- vscode_settings.json | 5 +++-- zshrc | 2 ++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 68f50f7aba..1106ec071d 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,5 @@ +#!/bin/zsh + backup() { target=$1 if [ -e "$target" ]; then # Does the config file already exist? @@ -8,7 +10,6 @@ backup() { fi } -#!/bin/zsh for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" @@ -34,15 +35,7 @@ if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then fi cd "$CURRENT_DIR" -setopt nocasematch -if [[ ! `uname` =~ "darwin" ]]; then - git config --global core.editor "code -n -w $@ >/dev/null 2>&1" - echo 'export BUNDLER_EDITOR="code $@ >/dev/null 2>&1 -a"' >> zshrc -else - git config --global core.editor "'/usr/local/bin/code' -n -w" - bundler_editor="'/usr/local/bin/code'" - echo "export BUNDLER_EDITOR=\"${bundler_editor} -a\"" >> zshrc -fi +git config --global core.editor "code" # VS Code if [[ ! `uname` =~ "darwin" ]]; then @@ -55,7 +48,7 @@ ln -sf $PWD/vscode_settings.json $CODE_PATH/settings.json zsh ~/.zshrc -echo "👌 Carry on with git setup!" +echo "👌 Carry on with git setup!" # SSH passphrase config if [[ `uname` =~ "darwin" ]]; then diff --git a/vscode_settings.json b/vscode_settings.json index 769d07884d..8bf228f584 100644 --- a/vscode_settings.json +++ b/vscode_settings.json @@ -1,5 +1,5 @@ { - "breadcrumbs.enabled": true, + "breadcrumbs.enabled": false, "editor.detectIndentation": false, "editor.formatOnPaste": true, "editor.minimap.enabled": false, @@ -45,5 +45,6 @@ "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, - "workbench.startupEditor": "newUntitledFile" + "workbench.startupEditor": "newUntitledFile", + "workbench.activityBar.visible": false } diff --git a/zshrc b/zshrc index 989867874c..87e77dfc9f 100644 --- a/zshrc +++ b/zshrc @@ -61,3 +61,5 @@ export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # Encoding stuff for the terminal export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 + +export BUNDLER_EDITOR=code From 6ff2ae0bbe9cb5f85e7d948ee9d31c0e05f0201b Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 6 Apr 2021 16:01:04 +0200 Subject: [PATCH 052/127] refactor install.sh --- install.sh | 30 +++++++++++++++------------ vscode_settings.json => settings.json | 3 ++- 2 files changed, 19 insertions(+), 14 deletions(-) rename vscode_settings.json => settings.json (94%) diff --git a/install.sh b/install.sh index 1106ec071d..a114ce45c3 100755 --- a/install.sh +++ b/install.sh @@ -1,21 +1,24 @@ #!/bin/zsh +# Define a function which rename a `target` file to `target.backup` if the file +# exists and if it's a 'real' file, ie not a symlink backup() { target=$1 - if [ -e "$target" ]; then # Does the config file already exist? - if [ ! -L "$target" ]; then # as a pure file? - mv "$target" "$target.backup" # Then backup it + if [ -e "$target" ]; then + if [ ! -L "$target" ]; then + mv "$target" "$target.backup" echo "-----> Moved your old $target config file to $target.backup" fi fi } +# For all files `$name` in the present folder except `*.sh`, `README.md`, `settings.json`, +# and `config`, backup the target file located at `~/.$name` and symlink `$name` to `~/.$name` for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'vscode_settings.json' ]] && [[ "$name" != 'config' ]]; then backup $target - if [ ! -e "$target" ]; then echo "-----> Symlinking your new $target" ln -s "$PWD/$name" "$target" @@ -24,34 +27,35 @@ for name in *; do fi done -# zsh plugins +# Install zsh-syntax-highlighting plugin CURRENT_DIR=`pwd` ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins" mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR" if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..." - git clone https://github.com/zsh-users/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting fi cd "$CURRENT_DIR" +# Setup git text editor to use VS Code git config --global core.editor "code" -# VS Code +# Symlink VS Code settings to the present `settings.json` file if [[ ! `uname` =~ "darwin" ]]; then CODE_PATH=~/.config/Code/User else CODE_PATH=~/Library/Application\ Support/Code/User fi backup "$CODE_PATH/settings.json" -ln -sf $PWD/vscode_settings.json $CODE_PATH/settings.json - -zsh ~/.zshrc - -echo "👌 Carry on with git setup!" +ln -sf $PWD/settings.json $CODE_PATH/settings.json -# SSH passphrase config +# Symlink SSH config file to the present `config` file for macOS if [[ `uname` =~ "darwin" ]]; then backup ~/.ssh/config ln -sf $PWD/config ~/.ssh/config fi + +# Refresh the current terminal with the newly installed configuration +zsh ~/.zshrc + +echo "👌 Carry on with git setup!" diff --git a/vscode_settings.json b/settings.json similarity index 94% rename from vscode_settings.json rename to settings.json index 8bf228f584..fcf9b32662 100644 --- a/vscode_settings.json +++ b/settings.json @@ -46,5 +46,6 @@ "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, "workbench.startupEditor": "newUntitledFile", - "workbench.activityBar.visible": false + "workbench.activityBar.visible": false, + "workbench.statusBar.visible": false } From 25d7dac1499724e6617d741c4107c6322a89393d Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:17:19 +0200 Subject: [PATCH 053/127] import default vscode settings.json --- settings.json | 90 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 36 deletions(-) diff --git a/settings.json b/settings.json index fcf9b32662..46a89d6f51 100644 --- a/settings.json +++ b/settings.json @@ -1,51 +1,69 @@ { - "breadcrumbs.enabled": false, "editor.detectIndentation": false, "editor.formatOnPaste": true, "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.rulers": [80, 120], "editor.renderControlCharacters": true, - "editor.renderWhitespace": "all", - "editor.rulers": [ - 80 - ], "editor.snippetSuggestions": "top", - "editor.tabSize": 2, "editor.trimAutoWhitespace": true, "editor.useTabStops": true, - "editor.wordWrap": "on", - "emmet.includeLanguages": { - "erb": "html" - }, + "editor.fontSize": 17, + "editor.scrollBeyondLastLine": true, + "editor.showFoldingControls": "always", + "emmet.includeLanguages": { "erb": "html" }, "emmet.triggerExpansionOnTab": true, - "files.exclude": { - ".asset-cache": true, - ".bundle": true, - ".git": true, - ".ipynb_checkpoints": true, - ".pytest_cache": true, - ".sass-cache": true, - ".svn": true, - "__pycache__": true, - "_site": true, - "build": true, - "coverage": true, - "dist": true, - "log": true, - "node_modules": true, - "public/packs": true, - "tmp": true - }, - "files.hotExit": "off", - "files.insertFinalNewline": true, - "files.trimTrailingWhitespace": true, - "git.enabled": false, + "explorer.confirmDelete": false, "window.restoreWindows": "none", - "workbench.colorTheme": "Monokai", "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, - "workbench.startupEditor": "newUntitledFile", - "workbench.activityBar.visible": false, - "workbench.statusBar.visible": false + "workbench.iconTheme": "vscode-great-icons", + "files.hotExit": "off", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "node_modules": true, + "tmp": true, + "log": true, + ".asset-cache": true, + ".bundle": true, + ".ipynb_checkpoints": true, + ".pytest_cache": true, + ".sass-cache": true, + ".svn": true, + "__pycache__": true, + "_site": true, + "build": true, + "coverage": true, + "dist": true, + "public/packs": true, + }, + "files.watcherExclude": { + "**/audits/**": true, + "**/coverage/**": true, + "**/log/**": true, + "**/node_modules/**": true, + "**/tmp/**": true, + "**/vendor/**": true + }, + "git.enabled": false, + "telemetry.enableTelemetry": false, + "telemetry.enableCrashReporter": false, + "[python]": { + "editor.tabSize": 4, + }, + // Ruby extension + "ruby.useBundler": true, + "ruby.useLanguageServer": true, + "ruby.format": "rubocop", + "ruby.lint": { + "rubocop": true + }, + "ruby.intellisense": "rubyLocate", } From 2d4458c9a492b722b55591a38bb1de3b74aa7b04 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:18:57 +0200 Subject: [PATCH 054/127] update config --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index d8a05bec15..739deb8b54 100644 --- a/config +++ b/config @@ -1,4 +1,4 @@ Host * - IgnoreUnknown AddKeysToAgent,UseKeychain - AddKeysToAgent yes UseKeychain yes + AddKeysToAgent yes + IdentityFile ~/.ssh/id_25519 From cab3bcbba276951601d3cd43660da180490735c6 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:28:05 +0200 Subject: [PATCH 055/127] remove unused files and ssh-add for macos --- README.md | 2 +- aliases | 2 +- install.sh | 4 +++- tm_properties | 3 --- vimrc | 9 --------- 5 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 tm_properties delete mode 100644 vimrc diff --git a/README.md b/README.md index 37f2ba87d0..feaa48d1bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This repository is used by [Le Wagon](https://www.lewagon.com) Web Development course students. +This repository is used by [Le Wagon Web Development course](https://www.lewagon.com/web-development-course/full-time) students. ## Toolset diff --git a/aliases b/aliases index 9c96c035ec..275ac0447d 100644 --- a/aliases +++ b/aliases @@ -5,5 +5,5 @@ alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/m # Quickly serve the current directory as HTTP alias serve='ruby -run -e httpd . -p 8000' # Or python -m SimpleHTTPServer :) -# NOTE: On Q2 2021, Le Wagon decided to change the Web Dev curriculum default text editor +# NOTE: On Q3 2021, Le Wagon decided to change the Web Dev curriculum default text editor alias stt="echo 'Launching VS Code instead of Sublime Text... (cf ~/.aliases)' && code ." diff --git a/install.sh b/install.sh index a114ce45c3..fc1d4b7731 100755 --- a/install.sh +++ b/install.sh @@ -49,10 +49,12 @@ fi backup "$CODE_PATH/settings.json" ln -sf $PWD/settings.json $CODE_PATH/settings.json -# Symlink SSH config file to the present `config` file for macOS +# Symlink SSH config file to the present `config` file for macOS and add SSH +# passphrase to the keychain if [[ `uname` =~ "darwin" ]]; then backup ~/.ssh/config ln -sf $PWD/config ~/.ssh/config + ssh-add -K ~/.ssh/id_25519 fi # Refresh the current terminal with the newly installed configuration diff --git a/tm_properties b/tm_properties deleted file mode 100644 index 68323da9b0..0000000000 --- a/tm_properties +++ /dev/null @@ -1,3 +0,0 @@ -tabSize = 2 -softTabs = true -softWrap = false \ No newline at end of file diff --git a/vimrc b/vimrc deleted file mode 100644 index c03f416982..0000000000 --- a/vimrc +++ /dev/null @@ -1,9 +0,0 @@ -syntax on -set backspace=indent,eol,start -set tabstop=2 shiftwidth=2 expandtab -if has("multi_byte") - set encoding=utf-8 - setglobal fileencoding=utf-8 -else - echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte" -endif From a91a7a1b895326e6470381b0f3e1afbe9ac82d17 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:47:15 +0200 Subject: [PATCH 056/127] update code path for wsl --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index fc1d4b7731..7ea126df95 100755 --- a/install.sh +++ b/install.sh @@ -41,10 +41,13 @@ cd "$CURRENT_DIR" git config --global core.editor "code" # Symlink VS Code settings to the present `settings.json` file -if [[ ! `uname` =~ "darwin" ]]; then - CODE_PATH=~/.config/Code/User -else +if [ `uname` =~ "darwin" ]; then CODE_PATH=~/Library/Application\ Support/Code/User +else + CODE_PATH=~/.config/Code/User + if [ ! -e $CODE_PATH ]; then + CODE_PATH=~/mnt/c/Users/le\ wagon\ 12/AppData/Roaming/Code/User + fi fi backup "$CODE_PATH/settings.json" ln -sf $PWD/settings.json $CODE_PATH/settings.json From 34747cf9eb37cc4401b6572f37aa5ae84b297631 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:56:18 +0200 Subject: [PATCH 057/127] update wsl code path --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7ea126df95..9c74a10b40 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,7 @@ if [ `uname` =~ "darwin" ]; then else CODE_PATH=~/.config/Code/User if [ ! -e $CODE_PATH ]; then - CODE_PATH=~/mnt/c/Users/le\ wagon\ 12/AppData/Roaming/Code/User + CODE_PATH=~/.vscode-server/data/Machine fi fi backup "$CODE_PATH/settings.json" From a0c3967230422cfd41fd06817a67f9a4d293b26d Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 09:04:08 +0200 Subject: [PATCH 058/127] add code as editor in gitconfig --- gitconfig | 1 + install.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 78d1401b09..8c61faf792 100644 --- a/gitconfig +++ b/gitconfig @@ -11,6 +11,7 @@ [core] pager = less -FRSX + editor = code [alias] co = checkout diff --git a/install.sh b/install.sh index 9c74a10b40..67f681c274 100755 --- a/install.sh +++ b/install.sh @@ -41,10 +41,13 @@ cd "$CURRENT_DIR" git config --global core.editor "code" # Symlink VS Code settings to the present `settings.json` file -if [ `uname` =~ "darwin" ]; then +# If it's a macOS +if [[ `uname` =~ "darwin" ]]; then CODE_PATH=~/Library/Application\ Support/Code/User +# Else, it's a Linux else CODE_PATH=~/.config/Code/User + # If this folder doesn't exist, it's a WSL if [ ! -e $CODE_PATH ]; then CODE_PATH=~/.vscode-server/data/Machine fi From 99bf41f84050c69582999236b85f8fdec166ac39 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 09:06:45 +0200 Subject: [PATCH 059/127] remove git config editor command and add the corresponding line in gitconfig file --- install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.sh b/install.sh index 67f681c274..dddf054ad8 100755 --- a/install.sh +++ b/install.sh @@ -37,9 +37,6 @@ if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then fi cd "$CURRENT_DIR" -# Setup git text editor to use VS Code -git config --global core.editor "code" - # Symlink VS Code settings to the present `settings.json` file # If it's a macOS if [[ `uname` =~ "darwin" ]]; then From 90f068acefd2090dbc3dfbac3256351d27db46f8 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 18 Jun 2021 09:12:41 +0200 Subject: [PATCH 060/127] protect load_nvmrc call when nvm is not installed yet --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 87e77dfc9f..789c1db088 100644 --- a/zshrc +++ b/zshrc @@ -45,7 +45,7 @@ load-nvmrc() { fi } add-zsh-hook chpwd load-nvmrc -load-nvmrc +[ -s "$NVM_DIR/nvm.sh" ] && load-nvmrc # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` From 1142a968d39e75ca55adbe4e8f882d1e6a79d198 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 12:26:56 +0200 Subject: [PATCH 061/127] add env var to disable warning --- zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zshrc b/zshrc index 789c1db088..6203dbbefb 100644 --- a/zshrc +++ b/zshrc @@ -9,6 +9,9 @@ plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting his # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 +# Disable warning about insecure completion-dependent directories +ZSH_DISABLE_COMPFIX=true + # Actually load Oh-My-Zsh source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) From 0e657e2ffc98d2d78c948cda5f79d14a341e02a7 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:48:35 +0200 Subject: [PATCH 062/127] update Darwin --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index dddf054ad8..1b6e10c2fa 100755 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ cd "$CURRENT_DIR" # Symlink VS Code settings to the present `settings.json` file # If it's a macOS -if [[ `uname` =~ "darwin" ]]; then +if [[ `uname` =~ "Darwin" ]]; then CODE_PATH=~/Library/Application\ Support/Code/User # Else, it's a Linux else @@ -54,7 +54,7 @@ ln -sf $PWD/settings.json $CODE_PATH/settings.json # Symlink SSH config file to the present `config` file for macOS and add SSH # passphrase to the keychain -if [[ `uname` =~ "darwin" ]]; then +if [[ `uname` =~ "Darwin" ]]; then backup ~/.ssh/config ln -sf $PWD/config ~/.ssh/config ssh-add -K ~/.ssh/id_25519 From 860da75bd83fdeab899bbd696eefcc82e3ec1e75 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:09:06 +0200 Subject: [PATCH 063/127] protect load nvm --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 6203dbbefb..3088d834fe 100644 --- a/zshrc +++ b/zshrc @@ -47,7 +47,7 @@ load-nvmrc() { nvm use default --silent fi } -add-zsh-hook chpwd load-nvmrc +add-zsh-hook chpwd [ -s "$NVM_DIR/nvm.sh" ] && load-nvmrc [ -s "$NVM_DIR/nvm.sh" ] && load-nvmrc # Rails and Ruby uses the local `bin` folder to store binstubs. From f60e551cd2b60cc72154b23f8554c4afaf9a789e Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:14:03 +0200 Subject: [PATCH 064/127] remove load-nvmrc precondition --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 3088d834fe..ae82eb3582 100644 --- a/zshrc +++ b/zshrc @@ -47,8 +47,8 @@ load-nvmrc() { nvm use default --silent fi } -add-zsh-hook chpwd [ -s "$NVM_DIR/nvm.sh" ] && load-nvmrc -[ -s "$NVM_DIR/nvm.sh" ] && load-nvmrc +add-zsh-hook chpwd load-nvmrc +load-nvmrc # Rails and Ruby uses the local `bin` folder to store binstubs. # So instead of running `bin/rails` like the doc says, just run `rails` From 3b23d3d29445150a7bd177cd3d0c6bb452f8383c Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:17:16 +0200 Subject: [PATCH 065/127] add if nvm in load-nvmrc script --- zshrc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/zshrc b/zshrc index ae82eb3582..1812097095 100644 --- a/zshrc +++ b/zshrc @@ -32,19 +32,21 @@ export NVM_DIR="$HOME/.nvm" # Call `nvm use` automatically in a directory with a `.nvmrc` file autoload -U add-zsh-hook load-nvmrc() { - local node_version="$(nvm version)" - local nvmrc_path="$(nvm_find_nvmrc)" - - if [ -n "$nvmrc_path" ]; then - local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") - - if [ "$nvmrc_node_version" = "N/A" ]; then - nvm install - elif [ "$nvmrc_node_version" != "$node_version" ]; then - nvm use --silent + if nvm -v > /dev/null + local node_version="$(nvm version)" + local nvmrc_path="$(nvm_find_nvmrc)" + + if [ -n "$nvmrc_path" ]; then + local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") + + if [ "$nvmrc_node_version" = "N/A" ]; then + nvm install + elif [ "$nvmrc_node_version" != "$node_version" ]; then + nvm use --silent + fi + elif [ "$node_version" != "$(nvm version default)" ]; then + nvm use default --silent fi - elif [ "$node_version" != "$(nvm version default)" ]; then - nvm use default --silent fi } add-zsh-hook chpwd load-nvmrc From b7fa9f349abe7083a4d9426772a0523e6f593686 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:19:28 +0200 Subject: [PATCH 066/127] fix typo --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 1812097095..369d24c750 100644 --- a/zshrc +++ b/zshrc @@ -32,7 +32,7 @@ export NVM_DIR="$HOME/.nvm" # Call `nvm use` automatically in a directory with a `.nvmrc` file autoload -U add-zsh-hook load-nvmrc() { - if nvm -v > /dev/null + if nvm -v > /dev/null; then local node_version="$(nvm version)" local nvmrc_path="$(nvm_find_nvmrc)" From c17034bafa5622d5624f072e3475120961b8c581 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:21:57 +0200 Subject: [PATCH 067/127] add & --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 369d24c750..9b86170955 100644 --- a/zshrc +++ b/zshrc @@ -32,7 +32,7 @@ export NVM_DIR="$HOME/.nvm" # Call `nvm use` automatically in a directory with a `.nvmrc` file autoload -U add-zsh-hook load-nvmrc() { - if nvm -v > /dev/null; then + if nvm -v &> /dev/null; then local node_version="$(nvm version)" local nvmrc_path="$(nvm_find_nvmrc)" From 79ba57cebd654afe74f736db69246fbec4d96ea0 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:25:23 +0200 Subject: [PATCH 068/127] fix ssh key name --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1b6e10c2fa..affeb0c178 100755 --- a/install.sh +++ b/install.sh @@ -57,7 +57,7 @@ ln -sf $PWD/settings.json $CODE_PATH/settings.json if [[ `uname` =~ "Darwin" ]]; then backup ~/.ssh/config ln -sf $PWD/config ~/.ssh/config - ssh-add -K ~/.ssh/id_25519 + ssh-add -K ~/.ssh/id_ed25519 fi # Refresh the current terminal with the newly installed configuration From 1a572c9f8c7fdb3712d0fb35415c642321ba2db2 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:32:56 +0200 Subject: [PATCH 069/127] update condition --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index affeb0c178..8210ae9d83 100755 --- a/install.sh +++ b/install.sh @@ -17,8 +17,9 @@ backup() { for name in *; do if [ ! -d "$name" ]; then target="$HOME/.$name" - if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'vscode_settings.json' ]] && [[ "$name" != 'config' ]]; then + if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'settings.json' ]] && [[ "$name" != 'config' ]]; then backup $target + echo $name if [ ! -e "$target" ]; then echo "-----> Symlinking your new $target" ln -s "$PWD/$name" "$target" @@ -50,7 +51,7 @@ else fi fi backup "$CODE_PATH/settings.json" -ln -sf $PWD/settings.json $CODE_PATH/settings.json +ln -s $PWD/settings.json $CODE_PATH/settings.json # Symlink SSH config file to the present `config` file for macOS and add SSH # passphrase to the keychain From 0f771c56301b251b1d38d6a2383106ed2eafe05a Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:40:14 +0200 Subject: [PATCH 070/127] remove temp echo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8210ae9d83..a34a82b61e 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,6 @@ for name in *; do target="$HOME/.$name" if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'settings.json' ]] && [[ "$name" != 'config' ]]; then backup $target - echo $name if [ ! -e "$target" ]; then echo "-----> Symlinking your new $target" ln -s "$PWD/$name" "$target" @@ -51,6 +50,7 @@ else fi fi backup "$CODE_PATH/settings.json" +echo "-----> Symlinking your new settings.json" ln -s $PWD/settings.json $CODE_PATH/settings.json # Symlink SSH config file to the present `config` file for macOS and add SSH From 07282c6586b5b69d9dce68d2ee9b51404d444666 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:43:41 +0200 Subject: [PATCH 071/127] force to redo the symlink if already exists --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a34a82b61e..db988ffb7e 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ for name in *; do backup $target if [ ! -e "$target" ]; then echo "-----> Symlinking your new $target" - ln -s "$PWD/$name" "$target" + ln -sf "$PWD/$name" "$target" fi fi fi @@ -51,7 +51,7 @@ else fi backup "$CODE_PATH/settings.json" echo "-----> Symlinking your new settings.json" -ln -s $PWD/settings.json $CODE_PATH/settings.json +ln -sf $PWD/settings.json $CODE_PATH/settings.json # Symlink SSH config file to the present `config` file for macOS and add SSH # passphrase to the keychain From 38211f7aa4fc4ac8cea2af835871368876d949a1 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:54:27 +0200 Subject: [PATCH 072/127] refactor symlink function --- install.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index db988ffb7e..f4f4ce48e0 100755 --- a/install.sh +++ b/install.sh @@ -12,6 +12,15 @@ backup() { fi } +symlink() { + file=$1 + link=$2 + if [ ! -e "$link" ]; then + echo "-----> Symlinking your new $link" + ln -s $file $link + fi +} + # For all files `$name` in the present folder except `*.sh`, `README.md`, `settings.json`, # and `config`, backup the target file located at `~/.$name` and symlink `$name` to `~/.$name` for name in *; do @@ -19,10 +28,7 @@ for name in *; do target="$HOME/.$name" if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'settings.json' ]] && [[ "$name" != 'config' ]]; then backup $target - if [ ! -e "$target" ]; then - echo "-----> Symlinking your new $target" - ln -sf "$PWD/$name" "$target" - fi + symlink $PWD/$name $target fi fi done @@ -49,15 +55,16 @@ else CODE_PATH=~/.vscode-server/data/Machine fi fi -backup "$CODE_PATH/settings.json" -echo "-----> Symlinking your new settings.json" -ln -sf $PWD/settings.json $CODE_PATH/settings.json +target="$CODE_PATH/settings.json" +backup $target +symlink $PWD/settings.json $target # Symlink SSH config file to the present `config` file for macOS and add SSH # passphrase to the keychain if [[ `uname` =~ "Darwin" ]]; then - backup ~/.ssh/config - ln -sf $PWD/config ~/.ssh/config + target=~/.ssh/config + backup $target + symlink $PWD/config $target ssh-add -K ~/.ssh/id_ed25519 fi From d4bf6b7ad6b4641aaa2d9acd26a5a1927490ad03 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:57:45 +0200 Subject: [PATCH 073/127] fix ssh key file name --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 739deb8b54..bf1c306686 100644 --- a/config +++ b/config @@ -1,4 +1,4 @@ Host * UseKeychain yes AddKeysToAgent yes - IdentityFile ~/.ssh/id_25519 + IdentityFile ~/.ssh/id_ed25519 From 2e1562ed0458f8c80265a27cc37b56ce76c3a360 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 22 Jun 2021 09:55:12 +0200 Subject: [PATCH 074/127] dotfiles are for web and data students --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index feaa48d1bf..3c08d57c25 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ -This repository is used by [Le Wagon Web Development course](https://www.lewagon.com/web-development-course/full-time) students. +This repository is used by [Le Wagon](https://www.lewagon.com) students. ## Toolset - [oh-my-zsh](http://ohmyz.sh/) - [Visual Studio Code](https://code.visualstudio.com/) - [git](https://git-scm.com/) -- Ruby via [`rbenv`](https://github.com/rbenv/rbenv) From 3a8a1273d2428f2064d082cfebe586268d5aae0f Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:44:56 +0200 Subject: [PATCH 075/127] merge settings from web dev and data science --- settings.json | 148 +++++++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 67 deletions(-) diff --git a/settings.json b/settings.json index 46a89d6f51..2778da9c0c 100644 --- a/settings.json +++ b/settings.json @@ -1,69 +1,83 @@ { - "editor.detectIndentation": false, - "editor.formatOnPaste": true, - "editor.minimap.enabled": false, - "editor.multiCursorModifier": "ctrlCmd", - "editor.insertSpaces": true, - "editor.tabSize": 2, - "editor.rulers": [80, 120], - "editor.renderControlCharacters": true, - "editor.snippetSuggestions": "top", - "editor.trimAutoWhitespace": true, - "editor.useTabStops": true, - "editor.fontSize": 17, - "editor.scrollBeyondLastLine": true, - "editor.showFoldingControls": "always", - "emmet.includeLanguages": { "erb": "html" }, - "emmet.triggerExpansionOnTab": true, - "explorer.confirmDelete": false, - "window.restoreWindows": "none", - "workbench.settings.editor": "json", - "workbench.settings.openDefaultSettings": true, - "workbench.settings.useSplitJSON": true, - "workbench.iconTheme": "vscode-great-icons", - "files.hotExit": "off", - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true, - "files.exclude": { - "**/.git": true, - "**/.DS_Store": true, - "node_modules": true, - "tmp": true, - "log": true, - ".asset-cache": true, - ".bundle": true, - ".ipynb_checkpoints": true, - ".pytest_cache": true, - ".sass-cache": true, - ".svn": true, - "__pycache__": true, - "_site": true, - "build": true, - "coverage": true, - "dist": true, - "public/packs": true, - }, - "files.watcherExclude": { - "**/audits/**": true, - "**/coverage/**": true, - "**/log/**": true, - "**/node_modules/**": true, - "**/tmp/**": true, - "**/vendor/**": true - }, - "git.enabled": false, - "telemetry.enableTelemetry": false, - "telemetry.enableCrashReporter": false, - "[python]": { - "editor.tabSize": 4, - }, - // Ruby extension - "ruby.useBundler": true, - "ruby.useLanguageServer": true, - "ruby.format": "rubocop", - "ruby.lint": { - "rubocop": true - }, - "ruby.intellisense": "rubyLocate", + "editor.detectIndentation": false, + "editor.formatOnPaste": true, + "editor.minimap.enabled": false, + "editor.multiCursorModifier": "ctrlCmd", + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.rulers": + [ + 80, + 120 + ], + "editor.renderControlCharacters": true, + "editor.snippetSuggestions": "top", + "editor.trimAutoWhitespace": true, + "editor.useTabStops": true, + "editor.fontSize": 17, + "editor.scrollBeyondLastLine": true, + "editor.showFoldingControls": "always", + "emmet.includeLanguages": + { + "erb": "html" + }, + "emmet.triggerExpansionOnTab": true, + "explorer.confirmDelete": false, + "window.restoreWindows": "none", + "workbench.settings.editor": "json", + "workbench.settings.openDefaultSettings": true, + "workbench.settings.useSplitJSON": true, + "workbench.iconTheme": "vscode-great-icons", + "files.hotExit": "off", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + "files.exclude": + { + "**/.git": true, + "**/.DS_Store": true, + "node_modules": true, + "tmp": true, + "log": true, + ".asset-cache": true, + ".bundle": true, + ".ipynb_checkpoints": true, + ".pytest_cache": true, + ".sass-cache": true, + ".svn": true, + "__pycache__": true, + "_site": true, + "build": true, + "coverage": true, + "dist": true, + "public/packs": true, + "**/.egg-info": true + }, + "files.watcherExclude": + { + "**/audits/**": true, + "**/coverage/**": true, + "**/log/**": true, + "**/node_modules/**": true, + "**/tmp/**": true, + "**/vendor/**": true + }, + "git.enabled": false, + "telemetry.enableTelemetry": false, + "telemetry.enableCrashReporter": false, + "[python]": + { + "editor.tabSize": 4 + }, + "python.pythonPath": "~/.pyenv/shims/python", + "python.formatting.provider": "yapf", + "ruby.useBundler": true, + "ruby.useLanguageServer": true, + "ruby.format": "rubocop", + "ruby.lint": + { + "rubocop": true + }, + "ruby.intellisense": "rubyLocate", + "workbench.startupEditor": "newUntitledFile" } From 647f3b253ca12f5c4fc07c3bdd3bd5fd333ca46c Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Wed, 23 Jun 2021 10:11:57 +0200 Subject: [PATCH 076/127] remove sublime setting --- Anaconda.sublime-settings | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Anaconda.sublime-settings diff --git a/Anaconda.sublime-settings b/Anaconda.sublime-settings deleted file mode 100644 index 83151c627a..0000000000 --- a/Anaconda.sublime-settings +++ /dev/null @@ -1,3 +0,0 @@ -{ - "anaconda_linting": false -} From f30d1b4776d1f020dbe672ff7c39f5e0a253f659 Mon Sep 17 00:00:00 2001 From: Edward Schults Date: Wed, 23 Jun 2021 15:40:00 +0200 Subject: [PATCH 077/127] fixes #89 --- install.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/install.sh b/install.sh index 7f576d59bf..95a3c556da 100755 --- a/install.sh +++ b/install.sh @@ -68,16 +68,6 @@ if [[ `uname` =~ "Darwin" ]]; then symlink $PWD/config $target ssh-add -K ~/.ssh/id_ed25519 fi -<<<<<<< HEAD -======= -mkdir -p $SUBL_PATH/Packages/User $SUBL_PATH/Installed\ Packages -backup "$SUBL_PATH/Packages/User/Preferences.sublime-settings" -curl -k https://sublime.wbond.net/Package%20Control.sublime-package > $SUBL_PATH/Installed\ Packages/Package\ Control.sublime-package -ln -s $PWD/Preferences.sublime-settings $SUBL_PATH/Packages/User/Preferences.sublime-settings -ln -s $PWD/Package\ Control.sublime-settings $SUBL_PATH/Packages/User/Package\ Control.sublime-settings -ln -s $PWD/SublimeLinter.sublime-settings $SUBL_PATH/Packages/User/SublimeLinter.sublime-settings -ln -s $PWD/Anaconda.sublime-settings $SUBL_PATH/Packages/User/Anaconda.sublime-settings ->>>>>>> master # Refresh the current terminal with the newly installed configuration zsh ~/.zshrc From 9694ea78f509076f1a649e7df03de177cd9a0e90 Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Mon, 5 Jul 2021 14:34:25 +0200 Subject: [PATCH 078/127] add a profile to the setup in order to handle the PATH for pyenv --- profile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 profile diff --git a/profile b/profile new file mode 100644 index 0000000000..604e592c8c --- /dev/null +++ b/profile @@ -0,0 +1,5 @@ + +# Setup the PATH for pyenv binaries and shims +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init --path)" From d699d395656e5882a59c38b36617c593d1fea852 Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Mon, 5 Jul 2021 14:45:01 +0200 Subject: [PATCH 079/127] protect pyenv command for web setup --- profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile b/profile index 604e592c8c..9e51a5c591 100644 --- a/profile +++ b/profile @@ -2,4 +2,4 @@ # Setup the PATH for pyenv binaries and shims export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init --path)" +type -a pyenv > /dev/null && eval "$(pyenv init --path)" From ac3b581c8ff0a34abd23413d19415414aeed6c92 Mon Sep 17 00:00:00 2001 From: Dimitri Bosch Date: Wed, 7 Jul 2021 14:47:24 +0200 Subject: [PATCH 080/127] Remove Ruby extension settings messing with the editor --- settings.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/settings.json b/settings.json index 2778da9c0c..a53810617a 100644 --- a/settings.json +++ b/settings.json @@ -71,13 +71,9 @@ }, "python.pythonPath": "~/.pyenv/shims/python", "python.formatting.provider": "yapf", - "ruby.useBundler": true, - "ruby.useLanguageServer": true, - "ruby.format": "rubocop", "ruby.lint": { "rubocop": true }, - "ruby.intellisense": "rubyLocate", "workbench.startupEditor": "newUntitledFile" } From d5ae2d792453ce9a2b5883e6930f730e849fef17 Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Tue, 20 Jul 2021 11:22:57 +0200 Subject: [PATCH 081/127] rename profile into zprofile so that it is sourced by zsh --- profile => zprofile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename profile => zprofile (100%) diff --git a/profile b/zprofile similarity index 100% rename from profile rename to zprofile From f61c2b106ca50e5e4701081a5d7043c54a8f4734 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 20 Jul 2021 14:28:39 +0200 Subject: [PATCH 082/127] remove export PATH from zshrc --- zprofile | 1 - zshrc | 2 -- 2 files changed, 3 deletions(-) diff --git a/zprofile b/zprofile index 9e51a5c591..8563f8d610 100644 --- a/zprofile +++ b/zprofile @@ -1,4 +1,3 @@ - # Setup the PATH for pyenv binaries and shims export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" diff --git a/zshrc b/zshrc index b4898a1cc0..0a99c011b5 100644 --- a/zshrc +++ b/zshrc @@ -21,8 +21,6 @@ export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) -export PATH="${HOME}/.pyenv/bin:${PATH}" # Needed for Linux/WSL -export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # https://github.com/pyenv/pyenv-virtualenv/issues/135 type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' # Load nvm (to manage your node versions) From 9bffc85b0332f8ed4da8ec0244384801fb03c15b Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Wed, 4 Aug 2021 16:34:30 +0200 Subject: [PATCH 083/127] disable virtual env prompt --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index 0a99c011b5..5e3110b403 100644 --- a/zshrc +++ b/zshrc @@ -21,6 +21,7 @@ export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) +export PYENV_VIRTUALENV_DISABLE_PROMPT=1 type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' # Load nvm (to manage your node versions) From ef9177edc4f32544f725b4c5a334cfec41849a49 Mon Sep 17 00:00:00 2001 From: Ted Hart-Davis Date: Sun, 31 Oct 2021 12:53:59 +0000 Subject: [PATCH 084/127] add quoting around git email and full_name, to make the script less likely to break in the case of bad output --- git_setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_setup.sh b/git_setup.sh index a5d6a4ebd0..8e780e2496 100755 --- a/git_setup.sh +++ b/git_setup.sh @@ -4,8 +4,8 @@ read full_name echo "Type in your email address (the one used for your GitHub account): " read email -git config --global user.email $email -git config --global user.name $full_name +git config --global user.email "$email" +git config --global user.name "$full_name" git add . git commit --message "My identity for @lewagon in the gitconfig" From fb28563a7f00f5d7918fe38654cf071f88d4a227 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:54:19 +0100 Subject: [PATCH 085/127] add emmet option then format and sort json --- settings.json | 55 ++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/settings.json b/settings.json index a53810617a..b990691634 100644 --- a/settings.json +++ b/settings.json @@ -1,44 +1,38 @@ { + "[python]": + { + "editor.tabSize": 4 + }, "editor.detectIndentation": false, + "editor.fontSize": 17, "editor.formatOnPaste": true, + "editor.insertSpaces": true, "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", - "editor.insertSpaces": true, - "editor.tabSize": 2, + "editor.renderControlCharacters": true, "editor.rulers": [ 80, 120 ], - "editor.renderControlCharacters": true, + "editor.scrollBeyondLastLine": true, + "editor.showFoldingControls": "always", "editor.snippetSuggestions": "top", + "editor.tabSize": 2, "editor.trimAutoWhitespace": true, "editor.useTabStops": true, - "editor.fontSize": 17, - "editor.scrollBeyondLastLine": true, - "editor.showFoldingControls": "always", "emmet.includeLanguages": { "erb": "html" }, + "emmet.showSuggestionsAsSnippets": true, "emmet.triggerExpansionOnTab": true, "explorer.confirmDelete": false, - "window.restoreWindows": "none", - "workbench.settings.editor": "json", - "workbench.settings.openDefaultSettings": true, - "workbench.settings.useSplitJSON": true, - "workbench.iconTheme": "vscode-great-icons", - "files.hotExit": "off", - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true, "files.exclude": { - "**/.git": true, "**/.DS_Store": true, - "node_modules": true, - "tmp": true, - "log": true, + "**/.egg-info": true, + "**/.git": true, ".asset-cache": true, ".bundle": true, ".ipynb_checkpoints": true, @@ -50,9 +44,15 @@ "build": true, "coverage": true, "dist": true, + "log": true, + "node_modules": true, "public/packs": true, - "**/.egg-info": true + "tmp": true }, + "files.hotExit": "off", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, "files.watcherExclude": { "**/audits/**": true, @@ -63,17 +63,18 @@ "**/vendor/**": true }, "git.enabled": false, - "telemetry.enableTelemetry": false, - "telemetry.enableCrashReporter": false, - "[python]": - { - "editor.tabSize": 4 - }, - "python.pythonPath": "~/.pyenv/shims/python", "python.formatting.provider": "yapf", + "python.pythonPath": "~/.pyenv/shims/python", "ruby.lint": { "rubocop": true }, + "telemetry.enableCrashReporter": false, + "telemetry.enableTelemetry": false, + "window.restoreWindows": "none", + "workbench.iconTheme": "vscode-great-icons", + "workbench.settings.editor": "json", + "workbench.settings.openDefaultSettings": true, + "workbench.settings.useSplitJSON": true, "workbench.startupEditor": "newUntitledFile" } From 9444223fe25d8b25e6ffc95127e65d3b6621ca36 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 22 Nov 2021 14:17:40 +0100 Subject: [PATCH 086/127] add bracket pairs --- settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.json b/settings.json index b990691634..a7d310b2cd 100644 --- a/settings.json +++ b/settings.json @@ -6,6 +6,7 @@ "editor.detectIndentation": false, "editor.fontSize": 17, "editor.formatOnPaste": true, + "editor.guides.bracketPairs": true, "editor.insertSpaces": true, "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", From 5a6f611f20f229123b41e7551f6f505882b200fe Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Mon, 22 Nov 2021 14:28:12 +0100 Subject: [PATCH 087/127] add bracket pair colorization setting --- settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.json b/settings.json index a7d310b2cd..4edadbdc9c 100644 --- a/settings.json +++ b/settings.json @@ -3,6 +3,7 @@ { "editor.tabSize": 4 }, + "editor.bracketPairColorization.enabled": true, "editor.detectIndentation": false, "editor.fontSize": 17, "editor.formatOnPaste": true, From 07cbca963c356a5a79577baf0ed66ec9a3ff5905 Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Thu, 6 Jan 2022 12:47:33 +0100 Subject: [PATCH 088/127] update conf to have vscode env match pyenv according to https://github.com/lewagon/data-setup/issues/156 --- settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 4edadbdc9c..6e57806c86 100644 --- a/settings.json +++ b/settings.json @@ -66,7 +66,8 @@ }, "git.enabled": false, "python.formatting.provider": "yapf", - "python.pythonPath": "~/.pyenv/shims/python", + "python.defaultInterpreterPath": "~/.pyenv/shims/python", + "python.terminal.activateEnvironment": false, "ruby.lint": { "rubocop": true From 02ceced788c2997c5da7147d322ae16ef619db3d Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Thu, 6 Jan 2022 13:01:22 +0100 Subject: [PATCH 089/127] restore python path --- settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.json b/settings.json index 6e57806c86..4236e10672 100644 --- a/settings.json +++ b/settings.json @@ -66,6 +66,7 @@ }, "git.enabled": false, "python.formatting.provider": "yapf", + "python.pythonPath": "~/.pyenv/shims/python", "python.defaultInterpreterPath": "~/.pyenv/shims/python", "python.terminal.activateEnvironment": false, "ruby.lint": From 09f4ef04379835eb333d0691c4031c30111f7764 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 6 Jan 2022 14:12:12 +0100 Subject: [PATCH 090/127] add vs code keybindings --- install.sh | 24 ++++++++++++------------ keybindings.json | 13 +++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 keybindings.json diff --git a/install.sh b/install.sh index 95a3c556da..2624e850e4 100755 --- a/install.sh +++ b/install.sh @@ -23,13 +23,11 @@ symlink() { # For all files `$name` in the present folder except `*.sh`, `README.md`, `settings.json`, # and `config`, backup the target file located at `~/.$name` and symlink `$name` to `~/.$name` -for name in *; do +for name in aliases gitconfig irbrc rspec zprofile zshrc; do if [ ! -d "$name" ]; then target="$HOME/.$name" - if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ] && [[ "$name" != 'settings.json' ]] && [[ "$name" != 'config' ]]; then - backup $target - symlink $PWD/$name $target - fi + backup $target + symlink $PWD/$name $target fi done @@ -44,7 +42,7 @@ if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then fi cd "$CURRENT_DIR" -# Symlink VS Code settings to the present `settings.json` file +# Symlink VS Code settings and keybindings to the present `settings.json` and `keybindings.json` files # If it's a macOS if [[ `uname` =~ "Darwin" ]]; then CODE_PATH=~/Library/Application\ Support/Code/User @@ -56,12 +54,14 @@ else CODE_PATH=~/.vscode-server/data/Machine fi fi -target="$CODE_PATH/settings.json" -backup $target -symlink $PWD/settings.json $target -# Symlink SSH config file to the present `config` file for macOS and add SSH -# passphrase to the keychain +for name in settings.json keybindings.json; do + target="$CODE_PATH/$name" + backup $target + symlink $PWD/$name $target +done + +# Symlink SSH config file to the present `config` file for macOS and add SSH passphrase to the keychain if [[ `uname` =~ "Darwin" ]]; then target=~/.ssh/config backup $target @@ -70,6 +70,6 @@ if [[ `uname` =~ "Darwin" ]]; then fi # Refresh the current terminal with the newly installed configuration -zsh ~/.zshrc +exec zsh echo "👌 Carry on with git setup!" diff --git a/keybindings.json b/keybindings.json new file mode 100644 index 0000000000..63705b065c --- /dev/null +++ b/keybindings.json @@ -0,0 +1,13 @@ +// Place your key bindings in this file to override the defaults +[ + { + "key": "ctrl+shift+v", + "command": "pasteAndIndent.action", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "cmd+shift+v", + "command": "pasteAndIndent.action", + "when": "editorTextFocus && !editorReadonly" + } +] From e2243ad29e0a8a0a3a35287d34baf208b5af465a Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 6 Jan 2022 15:03:54 +0100 Subject: [PATCH 091/127] add EDITOR env var in zshrc --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index 5e3110b403..e1fac8e6c7 100644 --- a/zshrc +++ b/zshrc @@ -65,3 +65,4 @@ export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export BUNDLER_EDITOR=code +export EDITOR=code From 3ad4f04a6a7f96c4ba47f53a378e278b117d1937 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Thu, 6 Jan 2022 16:45:13 +0100 Subject: [PATCH 092/127] Update settings.json --- settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.json b/settings.json index 4236e10672..6e57806c86 100644 --- a/settings.json +++ b/settings.json @@ -66,7 +66,6 @@ }, "git.enabled": false, "python.formatting.provider": "yapf", - "python.pythonPath": "~/.pyenv/shims/python", "python.defaultInterpreterPath": "~/.pyenv/shims/python", "python.terminal.activateEnvironment": false, "ruby.lint": From 2fe34a04a03922b99438d10025bd008f6b0373a1 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:01:10 +0100 Subject: [PATCH 093/127] sort json --- settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 6e57806c86..0ef68e94f0 100644 --- a/settings.json +++ b/settings.json @@ -65,8 +65,8 @@ "**/vendor/**": true }, "git.enabled": false, - "python.formatting.provider": "yapf", "python.defaultInterpreterPath": "~/.pyenv/shims/python", + "python.formatting.provider": "yapf", "python.terminal.activateEnvironment": false, "ruby.lint": { From 85a5ea1653dd4730da81a0bb33268ae076a30097 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Thu, 6 Jan 2022 18:37:12 +0100 Subject: [PATCH 094/127] add python specific vscode settings --- settings.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/settings.json b/settings.json index 4edadbdc9c..5682f9ae11 100644 --- a/settings.json +++ b/settings.json @@ -1,14 +1,18 @@ { "[python]": { - "editor.tabSize": 4 + "editor.tabSize": 4, + "editor.guides.bracketPairs": false, + "editor.bracketPairColorization.enabled": false, + "editor.fontSize": 14, + "editor.formatOnPaste": false, + "editor.multiCursorModifier": "alt" // similar to jupyter }, "editor.bracketPairColorization.enabled": true, "editor.detectIndentation": false, "editor.fontSize": 17, "editor.formatOnPaste": true, "editor.guides.bracketPairs": true, - "editor.insertSpaces": true, "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", "editor.renderControlCharacters": true, @@ -17,12 +21,9 @@ 80, 120 ], - "editor.scrollBeyondLastLine": true, "editor.showFoldingControls": "always", "editor.snippetSuggestions": "top", "editor.tabSize": 2, - "editor.trimAutoWhitespace": true, - "editor.useTabStops": true, "emmet.includeLanguages": { "erb": "html" @@ -65,16 +66,13 @@ "**/vendor/**": true }, "git.enabled": false, - "python.formatting.provider": "yapf", - "python.pythonPath": "~/.pyenv/shims/python", "ruby.lint": { "rubocop": true }, - "telemetry.enableCrashReporter": false, - "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", - "workbench.iconTheme": "vscode-great-icons", + "workbench.iconTheme": "material-icon-theme", "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, From 6dfff6ee8579ab53f5fd140d848766e348631ca7 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Thu, 6 Jan 2022 19:53:47 +0100 Subject: [PATCH 095/127] Update settings.json --- settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json b/settings.json index df740690ac..1d729092b6 100644 --- a/settings.json +++ b/settings.json @@ -79,7 +79,7 @@ }, "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", - "workbench.iconTheme": "material-icon-theme", + "workbench.iconTheme": "vscode-great-icons", "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, From 1ba1bd4e2543edbca4f740e58bf7679382f297fe Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Thu, 6 Jan 2022 19:59:08 +0100 Subject: [PATCH 096/127] converge and sort --- settings.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/settings.json b/settings.json index 1d729092b6..7b454ebc9f 100644 --- a/settings.json +++ b/settings.json @@ -1,21 +1,13 @@ { "[python]": { - "editor.tabSize": 4, - "editor.guides.bracketPairs": false, "editor.bracketPairColorization.enabled": false, - "editor.fontSize": 14, - "editor.formatOnPaste": false, - "editor.multiCursorModifier": "alt" // similar to jupyter + "editor.guides.bracketPairs": false, + "editor.tabSize": 4 }, - "python.defaultInterpreterPath": "~/.pyenv/shims/python", - "python.terminal.activateEnvironment": false, - "python.formatting.provider": "yapf", - "editor.bracketPairColorization.enabled": true, "editor.detectIndentation": false, - "editor.fontSize": 17, - "editor.formatOnPaste": true, + "editor.fontSize": 14, "editor.guides.bracketPairs": true, "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", From dff8b2c73247f3a8ed2d6755a1e54679323c8155 Mon Sep 17 00:00:00 2001 From: kevin robert Date: Wed, 19 Jan 2022 18:41:50 +0100 Subject: [PATCH 097/127] use ipdb as the default Python debugger --- zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zshrc b/zshrc index e1fac8e6c7..f54e77668e 100644 --- a/zshrc +++ b/zshrc @@ -66,3 +66,6 @@ export LC_ALL=en_US.UTF-8 export BUNDLER_EDITOR=code export EDITOR=code + +# Set ipdb as the default Python debugger +export PYTHONBREAKPOINT=ipdb.set_trace From c0aeb017a902b6bc8dd7153e4f4c53c480565a6f Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 25 Jan 2022 12:51:07 +0100 Subject: [PATCH 098/127] add wait flag --- gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 8c61faf792..d5d0954a07 100644 --- a/gitconfig +++ b/gitconfig @@ -11,7 +11,7 @@ [core] pager = less -FRSX - editor = code + editor = code --wait [alias] co = checkout From ff9d2466683ae181b87086a9df614f5775b32d08 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 11 Mar 2022 17:25:51 +0100 Subject: [PATCH 099/127] add default branch master to gitconfig --- gitconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitconfig b/gitconfig index d5d0954a07..3b524b058f 100644 --- a/gitconfig +++ b/gitconfig @@ -49,3 +49,6 @@ [pull] rebase = false + +[init] + defaultBranch = master From ce32fb8b522269dfe9abfe7a13f4c3b41bbf1967 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Wed, 4 May 2022 17:50:22 +0200 Subject: [PATCH 100/127] update vscode setup --- settings.json | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/settings.json b/settings.json index 7b454ebc9f..1164e93b71 100644 --- a/settings.json +++ b/settings.json @@ -1,6 +1,5 @@ { - "[python]": - { + "[python]": { "editor.bracketPairColorization.enabled": false, "editor.guides.bracketPairs": false, "editor.tabSize": 4 @@ -12,34 +11,31 @@ "editor.minimap.enabled": false, "editor.multiCursorModifier": "ctrlCmd", "editor.renderControlCharacters": true, - "editor.rulers": - [ + "editor.rulers": [ 80, 120 ], "editor.showFoldingControls": "always", "editor.snippetSuggestions": "top", "editor.tabSize": 2, - "emmet.includeLanguages": - { + "emmet.includeLanguages": { "erb": "html" }, "emmet.showSuggestionsAsSnippets": true, "emmet.triggerExpansionOnTab": true, "explorer.confirmDelete": false, - "files.exclude": - { - "**/.DS_Store": true, - "**/.egg-info": true, - "**/.git": true, + "files.exclude": { + "__pycache__": true, + "_site": true, ".asset-cache": true, ".bundle": true, ".ipynb_checkpoints": true, ".pytest_cache": true, ".sass-cache": true, ".svn": true, - "__pycache__": true, - "_site": true, + "**/.DS_Store": true, + "**/.egg-info": true, + "**/.git": true, "build": true, "coverage": true, "dist": true, @@ -52,8 +48,7 @@ "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, - "files.watcherExclude": - { + "files.watcherExclude": { "**/audits/**": true, "**/coverage/**": true, "**/log/**": true, @@ -62,15 +57,23 @@ "**/vendor/**": true }, "git.enabled": false, + "notebook.diff.ignoreMetadata": true, + "notebook.lineNumbers": "on", + "notebook.markup.fontSize": 13, "python.defaultInterpreterPath": "~/.pyenv/shims/python", "python.formatting.provider": "yapf", + "python.languageServer": "Pylance", + "python.linting.enabled": false, + "python.linting.flake8Enabled": false, + "python.linting.pylintEnabled": false, "python.terminal.activateEnvironment": false, - "ruby.lint": - { + "ruby.lint": { "rubocop": true }, "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", + "workbench.colorTheme": "GitHub Light", + "workbench.editor.enablePreview": true, "workbench.iconTheme": "vscode-great-icons", "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, From 758b3e0b49ebd7b70fb9517aa42b8dc7ec144169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 8 May 2022 16:48:57 +0200 Subject: [PATCH 101/127] Disable lt alias in favor of https://github.com/localtunnel/localtunnel (ngrok alternative) --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index f54e77668e..332abfe765 100644 --- a/zshrc +++ b/zshrc @@ -15,6 +15,7 @@ ZSH_DISABLE_COMPFIX=true # Actually load Oh-My-Zsh source "${ZSH}/oh-my-zsh.sh" unalias rm # No interactive rm by default (brought by plugins/common-aliases) +unalias lt # we need `lt` for https://github.com/localtunnel/localtunnel # Load rbenv if installed (to manage your Ruby versions) export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL From 39179a873cfa4d1ed02eb6e8afe47cfc9313e2c4 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Tue, 10 May 2022 13:08:53 +0200 Subject: [PATCH 102/127] Update settings.json --- settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.json b/settings.json index 1164e93b71..616e72e97d 100644 --- a/settings.json +++ b/settings.json @@ -72,7 +72,6 @@ }, "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", - "workbench.colorTheme": "GitHub Light", "workbench.editor.enablePreview": true, "workbench.iconTheme": "vscode-great-icons", "workbench.settings.editor": "json", From 8525ce91b65ab8f464427fbfba896b7cd3e42132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Fri, 10 Jun 2022 09:57:18 +0200 Subject: [PATCH 103/127] Remove pyenv plugin --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 332abfe765..e64b533f29 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps -plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search pyenv) +plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search) # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 @@ -23,7 +23,7 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv_prompt_info)]' +type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From 77d1f508798eca7c52f04417f10ddbbd4d1536c3 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Mon, 13 Jun 2022 11:08:56 +0200 Subject: [PATCH 104/127] add default size for vscode to 'maximized' --- settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 616e72e97d..ecf5b54699 100644 --- a/settings.json +++ b/settings.json @@ -72,10 +72,11 @@ }, "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", + "window.newWindowDimensions": "maximized", "workbench.editor.enablePreview": true, "workbench.iconTheme": "vscode-great-icons", "workbench.settings.editor": "json", "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, - "workbench.startupEditor": "newUntitledFile" + "workbench.startupEditor": "newUntitledFile", } From 4474fab8ae63d7c139f2ff40b7dd82e077c753d2 Mon Sep 17 00:00:00 2001 From: kevin robert Date: Mon, 20 Jun 2022 12:28:31 +0200 Subject: [PATCH 105/127] push default terminal position to right --- settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.json b/settings.json index ecf5b54699..954a639d61 100644 --- a/settings.json +++ b/settings.json @@ -79,4 +79,5 @@ "workbench.settings.openDefaultSettings": true, "workbench.settings.useSplitJSON": true, "workbench.startupEditor": "newUntitledFile", + "workbench.panel.defaultLocation": "right", } From ef767f591a840bdb52a1c007ee76c793c5205f34 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Tue, 12 Jul 2022 09:53:35 +0200 Subject: [PATCH 106/127] remove now unused sublime package control file --- Package Control.sublime-settings | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 Package Control.sublime-settings diff --git a/Package Control.sublime-settings b/Package Control.sublime-settings deleted file mode 100644 index ddcdc4b199..0000000000 --- a/Package Control.sublime-settings +++ /dev/null @@ -1,23 +0,0 @@ -{ - "installed_packages": - [ - "A File Icon", - "AdvancedNewFile", - "All Autocomplete", - "Anaconda", - "AutoPEP8", - "Babel", - "BracketHighlighter", - "Color Highlight", - "Emmet", - "ERB Snippets", - "Git", - "Latest Migration", - "MagicPython", - "Package Control", - "SCSS", - "SublimeLinter", - "SublimeLinter-flake8", - "SublimeLinter-rubocop" - ] -} From afa64add177d3a9370cc6012831a3408f93ccb95 Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 19 Aug 2022 16:52:12 +0200 Subject: [PATCH 107/127] make git aliases agnostic of git default branch name --- gitconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gitconfig b/gitconfig index 3b524b058f..8fcfaf770c 100644 --- a/gitconfig +++ b/gitconfig @@ -23,8 +23,14 @@ dt = difftool stat = !git --no-pager diff --stat - # Clean merged branches - sweep = !git branch --merged master | grep -v 'master$' | xargs git branch -d && git remote prune origin + # Set remotes/origin/HEAD -> defaultBranch (copied from https://stackoverflow.com/a/67672350/14870317) + remoteSetHead = remote set-head origin --auto + + # Get default branch name (copied from https://stackoverflow.com/a/67672350/14870317) + defaultBranch = !git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4 + + # Clean merged branches (adapted from https://stackoverflow.com/a/6127884/14870317) + sweep = !git branch --merged $(git defaultBranch) | grep -E -v ' (master|main)$' | xargs -r git branch -d && git remote prune origin # http://www.jukie.net/bart/blog/pimping-out-git-log lg = log --graph --all --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)%an%Creset %C(yellow)%d%Creset' @@ -33,7 +39,8 @@ # Then other can access via `git clone git://#{YOUR_IP_ADDRESS}/ serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git - m = checkout master + # Checkout to defaultBranch + m = !git checkout $(git defaultBranch) # Removes a file from the index unstage = reset HEAD -- From 732604f49131db4ce678c58a2fbb6a8ebdf14a8d Mon Sep 17 00:00:00 2001 From: Damien Milon <37899667+dmilon@users.noreply.github.com> Date: Fri, 19 Aug 2022 16:58:43 +0200 Subject: [PATCH 108/127] use git defaultBranch alias --- gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 8fcfaf770c..f73a0116e5 100644 --- a/gitconfig +++ b/gitconfig @@ -30,7 +30,7 @@ defaultBranch = !git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4 # Clean merged branches (adapted from https://stackoverflow.com/a/6127884/14870317) - sweep = !git branch --merged $(git defaultBranch) | grep -E -v ' (master|main)$' | xargs -r git branch -d && git remote prune origin + sweep = !git branch --merged $(git defaultBranch) | grep -E -v " $(git defaultBranch)$" | xargs -r git branch -d && git remote prune origin # http://www.jukie.net/bart/blog/pimping-out-git-log lg = log --graph --all --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)%an%Creset %C(yellow)%d%Creset' From f2a48defef20478628b1b49f0baa53f5dff0008b Mon Sep 17 00:00:00 2001 From: Gaetan Manchon Date: Tue, 11 Oct 2022 11:05:43 +0200 Subject: [PATCH 109/127] spacing --- gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index f73a0116e5..db3f5bd65d 100644 --- a/gitconfig +++ b/gitconfig @@ -49,7 +49,7 @@ autocorrect = 1 [push] - default = simple + default = simple [branch "master"] mergeoptions = --no-edit From f6267e04938b14b2982aac46d160026c23bfd571 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Tue, 25 Oct 2022 09:31:17 +0100 Subject: [PATCH 110/127] added check for virtualenv --- zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index e64b533f29..17ff84b61e 100644 --- a/zshrc +++ b/zshrc @@ -23,7 +23,12 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' +if ! (( $+commands[foobar] )) +then + type -a pyenv > /dev/null && eval "$(pyenv init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' +else + type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' +fi # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From a478c6df1678910ce6145395dec6bd4fb55bc8c8 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 26 Oct 2022 10:04:53 +0100 Subject: [PATCH 111/127] updated command check --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 17ff84b61e..a4e7bd80f3 100644 --- a/zshrc +++ b/zshrc @@ -23,7 +23,7 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -if ! (( $+commands[foobar] )) +if ! (( $+commands[virtualenv] )) then type -a pyenv > /dev/null && eval "$(pyenv init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' else From 396d42a30f60c34ad28c9ddb658ee3bbb2607de7 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 26 Oct 2022 11:18:40 +0100 Subject: [PATCH 112/127] silent run of virtualenv init --- zshrc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/zshrc b/zshrc index a4e7bd80f3..0d8fe3f938 100644 --- a/zshrc +++ b/zshrc @@ -23,12 +23,8 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -if ! (( $+commands[virtualenv] )) -then - type -a pyenv > /dev/null && eval "$(pyenv init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' -else - type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv version-name)]' -fi + +type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From ad8926a4a13bafe57d3aadd8aa5b35138e9253ad Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 26 Oct 2022 11:28:40 +0100 Subject: [PATCH 113/127] extra set of brackets to pipe entire eval --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 0d8fe3f938..fca78b32b9 100644 --- a/zshrc +++ b/zshrc @@ -24,7 +24,7 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' +type -a pyenv > /dev/null && eval "$(pyenv init -)" && (eval "$(pyenv virtualenv-init -)") > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From 6721314e1a00cbe2a73d845f8f03fed92a3a6f55 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 26 Oct 2022 11:51:09 +0100 Subject: [PATCH 114/127] create virtualenv hook function to allow eval to be redirected to /dev/null without failing to export enviroment variables --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index fca78b32b9..8fb56e8992 100644 --- a/zshrc +++ b/zshrc @@ -23,8 +23,8 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 - -type -a pyenv > /dev/null && eval "$(pyenv init -)" && (eval "$(pyenv virtualenv-init -)") > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' +function run_virtualenv_hook { eval "$(pyenv virtualenv-init -)"; } +type -a pyenv > /dev/null && eval "$(pyenv init -)" run_virtualenv_hook > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From 637b8998d06340590b98f37febaad473c542a317 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 26 Oct 2022 13:11:47 +0100 Subject: [PATCH 115/127] redirect only std err --- zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 8fb56e8992..0cebe11525 100644 --- a/zshrc +++ b/zshrc @@ -23,8 +23,7 @@ type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -function run_virtualenv_hook { eval "$(pyenv virtualenv-init -)"; } -type -a pyenv > /dev/null && eval "$(pyenv init -)" run_virtualenv_hook > /dev/null 2>&1 && RPROMPT+='[🐍 $(pyenv version-name)]' +type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init - 2> /dev/null)" && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" From 1a0008d3fe409adda6c0ba55c02f9dfd810583cb Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Wed, 30 Nov 2022 13:40:28 +0100 Subject: [PATCH 116/127] vs code remove .venv folder from search --- settings.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 954a639d61..7d99a9a96a 100644 --- a/settings.json +++ b/settings.json @@ -60,7 +60,6 @@ "notebook.diff.ignoreMetadata": true, "notebook.lineNumbers": "on", "notebook.markup.fontSize": 13, - "python.defaultInterpreterPath": "~/.pyenv/shims/python", "python.formatting.provider": "yapf", "python.languageServer": "Pylance", "python.linting.enabled": false, @@ -70,6 +69,10 @@ "ruby.lint": { "rubocop": true }, + "search.exclude": { + // Inherits all glob patterns from the `files.exclude` setting. + "**/.venv": true + }, "telemetry.telemetryLevel": "off", "window.restoreWindows": "none", "window.newWindowDimensions": "maximized", From 554ac2ab1a3939ede5cc6827530637b98ee74687 Mon Sep 17 00:00:00 2001 From: Bruno Lajoie Date: Wed, 30 Nov 2022 13:45:21 +0100 Subject: [PATCH 117/127] merge master --- settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.json b/settings.json index 7d99a9a96a..191f1c7ddb 100644 --- a/settings.json +++ b/settings.json @@ -60,6 +60,7 @@ "notebook.diff.ignoreMetadata": true, "notebook.lineNumbers": "on", "notebook.markup.fontSize": 13, + "python.defaultInterpreterPath": "~/.pyenv/shims/python", "python.formatting.provider": "yapf", "python.languageServer": "Pylance", "python.linting.enabled": false, From 56cc1a0b362d744774e41bc8954296b607bce54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Tue, 13 Dec 2022 19:37:05 +0100 Subject: [PATCH 118/127] Fixes #126 --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2624e850e4..e4f524eda1 100755 --- a/install.sh +++ b/install.sh @@ -66,7 +66,7 @@ if [[ `uname` =~ "Darwin" ]]; then target=~/.ssh/config backup $target symlink $PWD/config $target - ssh-add -K ~/.ssh/id_ed25519 + ssh-add --apple-use-keychain ~/.ssh/id_ed25519 fi # Refresh the current terminal with the newly installed configuration From f4c909c159cf04da57441f12f07cf6322e083747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Sun, 14 May 2023 19:09:10 +0200 Subject: [PATCH 119/127] Fixes #138 --- zprofile | 1 + 1 file changed, 1 insertion(+) diff --git a/zprofile b/zprofile index 8563f8d610..dcaefd2eb4 100644 --- a/zprofile +++ b/zprofile @@ -1,4 +1,5 @@ # Setup the PATH for pyenv binaries and shims export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(/opt/homebrew/bin/brew shellenv 2> /dev/null)" type -a pyenv > /dev/null && eval "$(pyenv init --path)" From adf05d5bffffc08ad040fb9c491ebea0350a5ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Saunier?= Date: Thu, 25 May 2023 15:53:39 +0200 Subject: [PATCH 120/127] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..f630abcc75 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 La Loco SAS, head of Le Wagon Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From f9b3da1b882b26d28b13422047b556d10200f748 Mon Sep 17 00:00:00 2001 From: kevin tchiadeu Date: Thu, 22 Aug 2024 23:52:57 +0200 Subject: [PATCH 121/127] add pryrc --- pryrc | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pryrc diff --git a/pryrc b/pryrc new file mode 100644 index 0000000000..b0ca2d5d81 --- /dev/null +++ b/pryrc @@ -0,0 +1,36 @@ +# https://github.com/pry/pry/tree/master/lib/pry + +if defined?(Rails) + short_env_name_options = { + 'development' => 'dev', + 'production' => 'prod' + } + app_name = Rails.application.class.module_parent_name.underscore.dasherize + env_name = short_env_name_options.fetch(Rails.env) { Rails.env } + description = 'Prompt has to match the rails app name' +else + current_directory = Dir.pwd.split('/').last.to_s + description = 'Prompt has to match the current directory name' +end + +# https://github.com/pry/pry/blob/master/lib/pry/prompt.rb +Pry::Prompt.add(:current_app) do |context, nesting, pry_instance, sep| + format( + '[%s] %s(%s)%s%s ', + in_count: pry_instance.input_ring.count, + current_app: app_name || current_directory, + context: env_name || Pry.view_clip(context), + nesting: (nesting > 0 ? ":#{nesting}" : ''), + separator: sep + ) +end + +prompt = Pry::Prompt[:current_app] +procs = [ + proc { |*args| prompt.wait_proc.call(*args).to_s }, + proc { |*args| prompt.incomplete_proc.call(*args).to_s } +] + +Pry.config.prompt = Pry::Prompt.new( + 'custom_app_prompt', description, procs +) From 64a859fedd7d10ce0c508c96b81680f5229ae4c2 Mon Sep 17 00:00:00 2001 From: kevin tchiadeu Date: Wed, 28 Aug 2024 09:55:10 +0200 Subject: [PATCH 122/127] add pryrc in files to config --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e4f524eda1..dd8519f809 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ symlink() { # For all files `$name` in the present folder except `*.sh`, `README.md`, `settings.json`, # and `config`, backup the target file located at `~/.$name` and symlink `$name` to `~/.$name` -for name in aliases gitconfig irbrc rspec zprofile zshrc; do +for name in aliases gitconfig irbrc rspec zprofile zshrc pryrc; do if [ ! -d "$name" ]; then target="$HOME/.$name" backup $target From 903ad73feb47da0136a860430b789df34543101c Mon Sep 17 00:00:00 2001 From: kevin tchiadeu Date: Wed, 28 Aug 2024 10:02:31 +0200 Subject: [PATCH 123/127] reorder config files --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index dd8519f809..ef106d8285 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ symlink() { # For all files `$name` in the present folder except `*.sh`, `README.md`, `settings.json`, # and `config`, backup the target file located at `~/.$name` and symlink `$name` to `~/.$name` -for name in aliases gitconfig irbrc rspec zprofile zshrc pryrc; do +for name in aliases gitconfig irbrc pryrc rspec zprofile zshrc; do if [ ! -d "$name" ]; then target="$HOME/.$name" backup $target From 9cdda31ff7f501b7a5fee5cad850b75c33a23e30 Mon Sep 17 00:00:00 2001 From: kevin robert Date: Tue, 11 Nov 2025 19:41:46 +0100 Subject: [PATCH 124/127] My identity for @lewagon in the gitconfig --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 0cebe11525..53d873e3b7 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps -plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search) +plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search ssh-agent) # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 @@ -18,7 +18,7 @@ unalias rm # No interactive rm by default (brought by plugins/common-aliases) unalias lt # we need `lt` for https://github.com/localtunnel/localtunnel # Load rbenv if installed (to manage your Ruby versions) -export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL +# export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) From 659020a7dbd6776330f403fcb70b09b7a3cc38d9 Mon Sep 17 00:00:00 2001 From: Kevin Robert Date: Mon, 17 Nov 2025 16:23:05 +0100 Subject: [PATCH 125/127] My identity for @lewagon in the gitconfig --- .gitconfig | 3 +++ zshrc | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000000..6ec825479c --- /dev/null +++ b/.gitconfig @@ -0,0 +1,3 @@ +[user] + email = kevin.j.robert@gmail.com + name = Kevin Robert diff --git a/zshrc b/zshrc index 53d873e3b7..b173c13503 100644 --- a/zshrc +++ b/zshrc @@ -70,3 +70,9 @@ export EDITOR=code # Set ipdb as the default Python debugger export PYTHONBREAKPOINT=ipdb.set_trace + +# Enable direnv +eval "$(direnv hook zsh)" + +# Created by `pipx` on 2025-11-17 10:26:51 +export PATH="$PATH:/Users/kevinrobert/.local/bin" From e4a93c81d1743ab9e53092bbbfd338fbb92dea46 Mon Sep 17 00:00:00 2001 From: Kevin Robert Date: Tue, 2 Dec 2025 10:40:49 +0100 Subject: [PATCH 126/127] Revert "My identity for @lewagon in the gitconfig" This reverts commit 659020a7dbd6776330f403fcb70b09b7a3cc38d9. --- .gitconfig | 3 --- zshrc | 6 ------ 2 files changed, 9 deletions(-) delete mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 6ec825479c..0000000000 --- a/.gitconfig +++ /dev/null @@ -1,3 +0,0 @@ -[user] - email = kevin.j.robert@gmail.com - name = Kevin Robert diff --git a/zshrc b/zshrc index b173c13503..53d873e3b7 100644 --- a/zshrc +++ b/zshrc @@ -70,9 +70,3 @@ export EDITOR=code # Set ipdb as the default Python debugger export PYTHONBREAKPOINT=ipdb.set_trace - -# Enable direnv -eval "$(direnv hook zsh)" - -# Created by `pipx` on 2025-11-17 10:26:51 -export PATH="$PATH:/Users/kevinrobert/.local/bin" From 0e5fdfef9de0afbb7078492f0e1b740230df8b89 Mon Sep 17 00:00:00 2001 From: Kevin Robert Date: Tue, 2 Dec 2025 10:42:28 +0100 Subject: [PATCH 127/127] Revert "My identity for @lewagon in the gitconfig" This reverts commit 9cdda31ff7f501b7a5fee5cad850b75c33a23e30. --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 53d873e3b7..0cebe11525 100644 --- a/zshrc +++ b/zshrc @@ -4,7 +4,7 @@ ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" # Useful oh-my-zsh plugins for Le Wagon bootcamps -plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search ssh-agent) +plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search) # (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md export HOMEBREW_NO_ANALYTICS=1 @@ -18,7 +18,7 @@ unalias rm # No interactive rm by default (brought by plugins/common-aliases) unalias lt # we need `lt` for https://github.com/localtunnel/localtunnel # Load rbenv if installed (to manage your Ruby versions) -# export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL +export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions)