Zachary W. Huang

Home Projects Blog Guides Resume

My development environment - updated 8/15/2021

WSL - Windows Subsystem for Linux

  • Requires: Windows 10 Pro + HyperV, Version 1903 or higher & Build 18362 or higher

Install

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install distro of your choice (I use Ubuntu 20.04) from the Windows Store

Start with wsl or from Windows Terminal

Windows Terminal

  • Install from Windows Store
  • Set default profile to Linux
  • Set color scheme (I like One-Half Dark)
  • Set starting directory to //wsl$/[distro name]/home/[user], filling in [distro name] and [user]
  • Download and install a font from NerdFonts.
  • Set cursor shape to “filled box”
  • Make sure the “intenseStyle” option is set to “bold font”

NeoVim

Prerequisites

  • Clang or GCC 4.4+
  • CMake 2.8.12+, built with TLS/SSL
    • Grab latest from github or do pip install cmake
sudo apt-get install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl

Install

git clone https://github.com/neovim/neovim
git checkout stable # for stable release
cd neovim
make CMAKE_BUILD_TYPE=Release
# default install path is /usr/local, set custom path with 'CMAKE_INSTALL_PREFIX=...'
sudo make install

Config

# install LunarVim, assuming Neovim 0.5, npm, node, and cargo are installed
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)

Use my custom LunarVim config

wget -O ~/.config/lvim/config.lua https://gist.githubusercontent.com/zack466/7441ea54f4a703cb909cd3386420c529/raw/62f49e7cbd114767138c007c7d364a7a39f79499/config.lua

Tmux

Install

sudo apt install tmux

If need to build from source, run

sudo apt install libevent-dev ncurses-dev build-essential bison pkg-config
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure
make && sudo make install

Config

# tmux plugin manager, requires tmux 1.9+
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# download my .tmux.conf
wget -O ~/.tmux.conf https://gist.githubusercontent.com/zack466/28dd2de22d0dcfa2ded0715b1da24830/raw/7e8472b0d99628a72832d3f3278addd6efd1bdac/.tmux.conf

In tmux, press <prefix>-I to install plugins

Additional Utilities

“Modern UNIX” shell utilities

Install

# https://github.com/sharkdp/bat/issues/938#issuecomment-840448228
sudo apt install -o Dpkg::Options::="--force-overwrite" bat ripgrep

sudo apt install fzf fdfind htop

Add to .bashrc:

alias cat=batcat
alias fd=fdfind

Github CLI (gh)

Install

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

Note: If requires dirmngr, do sudo apt install dirmngr

Config

gh auth login

Programming languages/environments

NodeJS/NPM

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# restart shell
nvm install 16

Deno

curl -fsSL https://deno.land/x/install/install.sh | sh
echo "export PATH=\$DENO_INSTALL/bin:\$PATH" >> ~/.bashrc

Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo "export PATH=\$HOME/.cargo/bin:\$PATH" >> ~/.bashrc

Conda

Anaconda:

# can't pipe directly into bash bc bug with install script
wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
bash Anaconda3-2021.05-Linux-x86_64.sh

Miniconda:

# can't pipe directly into bash bc bug with install script
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Julia

cd ~
wget https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.2-linux-x86_64.tar.gz
tar -xvf julia-1.6.2-linux-x86_64.tar.gz
echo "export PATH=\$HOME/julia-1.6.2/bin:\$PATH" >> ~/.bashrc

OCaml

# install opam
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
# installing ocaml
opam init
eval $(opam env) # activate opam environment

Haskell

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Java

sudo apt install openjdk-11-jdk
RSS icon github logo linkedin logo

Zachary W. Huang © 2021-2024