Inspiration from this blog 4 เทคนิคง่ายๆ เพื่อจัดการ Dev Environment แบบเนี๊ยบๆ ทันใจวัยทีน ⚡️
Develop envinronment with short command
ws rin # start redis containerRename 'Devenvironment' folder to 'workspaces'.
mv devenvironment workspacesRun setup script.
cd workspaces && ./setup.sh YOUR_PATH_IN_HOMEExample:
./setup.sh kongYou can do this by adding the following line to your profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
# Workspaces
export WORKSPACE=YOUR_PATH
source $WORKSPACE/workspaces/.configNote: This not apply untill the next time you log into your terminal. You can run the following commands for the different shells on the command line:
bash: source ~/.bashrc
zsh: source ~/.zshrc- makefile
- podman or docker
- docker-compose
- fzf
- fd
use gocover to generate code coverage for your go project.
gocover args use fdir to search directory with fzf.
fdir argsuse docker command instead of podman for podman user.
docker argsNote
You can disable this by removing the
alias docker="podman" # Use podman as dockerin ~/.config/workspaces/.config or use wsconfig open vim to edit config.
use ws command to start container. alais of docker compose up -d.
ws rin # start redis container
ws marin # start mariadb container
ws roxy # start cloudbeaver container
ws yuki # start mysql container
ws rem # start mongo containeruse ws arg stop to stop container. alais of docker compose down.
ws rin stop # stop redis containeruse ws arg cp to copy docker-compose.yml to current directory.
ws rin cp # copy redis docker-compose.yml to current directoryuse wg, pg, lg and brg to change directory to workspaces folder.
wg # go to workspaces folder
pg # go to projects folder
lg # go to lab folder
brg # go to brains folder