Skip to content

kongsakchai/devenvironment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dev Environment

Inspiration from this blog 4 เทคนิคง่ายๆ เพื่อจัดการ Dev Environment แบบเนี๊ยบๆ ทันใจวัยทีน ⚡️

Intro

Develop envinronment with short command

ws rin # start redis container

Setup

Rename 'Devenvironment' folder to 'workspaces'.

mv devenvironment workspaces

Run setup script.

cd workspaces && ./setup.sh YOUR_PATH_IN_HOME

Example:

./setup.sh kong

Manual Setup

You 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/.config

Note: 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

Requirement

  • makefile
  • podman or docker
  • docker-compose
  • fzf
  • fd

Command

use gocover to generate code coverage for your go project.

gocover args 

use fdir to search directory with fzf.

fdir args

use docker command instead of podman for podman user.

docker args

Note

You can disable this by removing the

alias docker="podman" # Use podman as docker

in ~/.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 container

use ws arg stop to stop container. alais of docker compose down.

ws rin stop # stop redis container

use ws arg cp to copy docker-compose.yml to current directory.

ws rin cp # copy redis docker-compose.yml to current directory

use 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published