Skip to content

Instantly share code, notes, and snippets.

@ChrisFrontDev
Forked from felipefontoura/wsl.md
Created June 12, 2022 02:57
Show Gist options
  • Save ChrisFrontDev/2083018e1826030981737ae4550c32b0 to your computer and use it in GitHub Desktop.
Save ChrisFrontDev/2083018e1826030981737ae4550c32b0 to your computer and use it in GitHub Desktop.
Master Class #009 - https://youtu.be/SWvs4KtHv-4

WSL

https://docs.microsoft.com/en-us/windows/wsl/install

$ wsl --set-default-version 2
$ wsl --install -d ubuntu

ArchWSL

https://github.com/yuk7/ArchWSL

$ sudo pacman-key --init
$ sudo pacman-key --populate
$ sudo pacman -Syy archlinux-keyring
$ sudo pacman -Syyuu
$ sudo pacman -Sy wget openssh

Yay

https://github.com/Jguer/yay

$ sudo pacman -Sy --needed git base-devel
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si

ZSH

https://github.com/romkatv/powerlevel10k

$ yay -Sy zsh
$ yay -S --noconfirm zsh-theme-powerlevel10k-git
$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
$ chsh -s /usr/bin/zsh

ZSH Auto Suggestions

https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#manual-git-clone

$ git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
$ echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >>~/.zshrc

Shell RUST

https://zaiste.net/posts/shell-commands-rust/

$ nano ~/.alias
# Git
alias g='git'
alias gck='git checkout'
alias gst='git status'
alias gps='git push'
alias gpl='git pull'
alias gcm='git commit'

# Shell
alias ls='exa --icons'
alias cat='bat'
alias find='fd'
alias grep='rg'
alias ps='procs'
$ yay -Sy bat exa fd ripgrep procs grex
$ echo 'source ~/.alias' >> ~/.zshrc

ASDF

Node js

https://github.com/asdf-vm/asdf-nodejs

$ yay -Sy asdf-vm
$ echo 'source /opt/asdf-vm/asdf.sh' >> ~/.zshrc

$ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
$ asdf list-all nodejs
$ asdf install nodejs 18.1.0
$ asdf global nodejs 18.1.0
$ node -v
$ npm i yarn -g

Ruby

https://github.com/asdf-vm/asdf-ruby

$ asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
$ asdf list-all ruby
$ asdf install ruby 3.1.2
$ asdf global ruby 3.1.2
$ ruby -v
$ echo 'gem: --no-document' >> ~/.gemrc
$ gem install bundler rails
$ yay -Sy postgresql-libs

Python

https://github.com/danhper/asdf-python

$ asdf plugin-add python
$ asdf list-all python
$ asdf install python 2.7.18
$ asdf install python 3.10.4
$ asdf global python 2.7.18
$ python --version

PHP

https://github.com/asdf-community/asdf-php

$ asdf plugin-add php https://github.com/asdf-community/asdf-php.git
$ asdf list-all php
$ yay -Sy re2c gd postgresql-libs libzip
$ asdf install php 8.1.6
$ asdf global php 8.1.6
$ php -v
$ composer -v
$ php -m
$ php -m | grep mysql
$ php -m | grep imagick
$ yay -Sy imagemagick
$ pecl install imagick
$ echo "extension=imagick.so" >> $(asdf where php)/conf.d/php.ini

Java

https://github.com/halcyon/asdf-java

$ asdf plugin-add java https://github.com/halcyon/asdf-java.git
$ asdf list-all java
$ asdf install java openjdk-18.0.1.1
$ asdf global java openjdk-18.0.1.1
$ java -version
$ echo 'source ~/.asdf/plugins/java/set-java-home.zsh' >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment