Last active
March 9, 2025 14:42
-
-
Save huyxdong/937384844b1e8e798d1a0edc176f7cc4 to your computer and use it in GitHub Desktop.
Reinstall OS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
postgresql: | |
image: postgres | |
container_name: postgresql | |
environment: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./docker-data/postgresql:/var/lib/postgresql/data | |
networks: | |
- docker-network-dev | |
timescale: | |
image: timescale/timescaledb:latest-pg16 | |
container_name: timescale | |
environment: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
ports: | |
- "5434:5432" | |
volumes: | |
- ./docker-data/timescale:/var/lib/postgresql/data | |
networks: | |
- docker-network-dev | |
mysql: | |
image: mysql:latest | |
container_name: mysql | |
environment: | |
MYSQL_DATABASE: "database" | |
MYSQL_USER: "huydx" | |
MYSQL_PASSWORD: "huydx" | |
MYSQL_ROOT_PASSWORD: "root" | |
command: | |
[ | |
"--character-set-server=utf8mb4", | |
"--collation-server=utf8mb4_unicode_ci", | |
] | |
ports: | |
- "3306:3306" | |
expose: | |
- "3306" | |
volumes: | |
- ./docker-data/mysql:/var/lib/mysql | |
networks: | |
- docker-network-dev | |
redis: | |
image: redis:alpine | |
container_name: redis | |
volumes: | |
- ./docker-data/redis:/var/lib/redis | |
ports: | |
- "6379:6379" | |
- "26378:26379" | |
networks: | |
- docker-network-dev | |
mongodb: | |
image: mongo:latest | |
container_name: mongodb | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: MongoDB202x! | |
ports: | |
- "27017:27017" | |
volumes: | |
- ./docker-data/mongodb:/data/db | |
networks: | |
- docker-network-dev | |
rabbitmq: | |
image: rabbitmq:management | |
container_name: rabbitmq | |
environment: | |
- RABBITMQ_DEFAULT_USER=guest | |
- RABBITMQ_DEFAULT_PASS=guest | |
ports: | |
- "5672:5672" | |
- "15672:15672" | |
networks: | |
- docker-network-dev | |
elasticsearch: | |
image: elasticsearch:8.13.0 | |
container_name: elasticsearch | |
environment: | |
discovery.type: single-node | |
ES_JAVA_OPTS: "-Xms512m -Xmx512m" | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
healthcheck: | |
test: | |
[ | |
"CMD-SHELL", | |
"curl --silent --fail localhost:9200/_cluster/health || exit 1", | |
] | |
interval: 10s | |
timeout: 10s | |
retries: 3 | |
networks: | |
- docker-network-dev | |
kibana: | |
image: kibana:8.13.0 | |
container_name: kibana | |
ports: | |
- "5601:5601" | |
depends_on: | |
- elasticsearch | |
networks: | |
- docker-network-dev | |
networks: | |
docker-network-dev: | |
driver: bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install apt-transport-https curl wget git htop tree zip unzip rar unrar direnv protobuf-compiler make ripgrep git-delta telnet wamerican | |
git config --global user.name huydong | |
git config --global user.email [email protected] | |
### INSTALL ZSH ### | |
sudo apt-get install zsh | |
chsh -s $(which zsh) | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $ZSH_CUSTOM/plugins/you-should-use | |
#OH MY ZSH PLUGIN# | |
plugins=( | |
git | |
docker | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
z | |
aliases | |
copypath | |
copyfile | |
dircycle | |
encode64 | |
extract | |
genpass | |
safe-paste | |
debian | |
direnv | |
you-should-use | |
git-flow | |
python | |
pre-commit | |
) | |
export PATH="/home/huydx/.local/bin:$PATH" | |
# Install starship prompt theme for zsh | |
curl -sS https://starship.rs/install.sh | sh | |
# Append this line to .zshrc | |
eval "$(starship init zsh)" | |
# Change this line in .zshrc | |
FROM: ZSH_THEME="robbyrussell" | |
TO: ZSH_THEME="" | |
# Install Nerd Font to display special icons/symbols | |
https://www.nerdfonts.com/ | |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/SourceCodePro.zip | |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FiraCode.zip | |
unzip | |
copy all fonts into folder ~/.local/share/fonts | |
run command: sudo fc-cache -fv | |
# Lazy tools (lazygit && lazydocker) | |
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') | |
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" | |
tar xf lazygit.tar.gz lazygit | |
sudo install lazygit /usr/local/bin | |
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash | |
# Add aliases | |
alias python="python3" | |
alias lzd="lazydocker" | |
alias lg="lazygit" | |
######## ALL IN ONE DEVTOOL ######### | |
https://mise.jdx.dev/dev-tools/ | |
It can replace pyenv, nvm, gvm ... and much more. Let's check it out! | |
1. curl https://mise.run | sh | |
2. echo "eval \"\$(/home/huydx/.local/bin/mise activate zsh)\"" >> "~/.zshrc" | |
######## NEOVIM ############## | |
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz | |
sudo rm -rf /opt/nvim | |
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz | |
###### Install Zellij ########## | |
1. Download Zellij -> https://github.com/zellij-org/zellij/releases | |
2. tar -xvf zellij*.tar.gz | |
3. mv zellij ~/.local/bin/zellij | |
4. chmod +x ~/.local/bin/zellij | |
5. sudo apt install wl-clipboard xclip | |
6. mkdir ~/.config/zellij | |
7. zellij setup --dump-config > ~/.config/zellij/config.kdl | |
8. Uncomment this line: copy_command depend on monitor session are you using (X11 / Wayland / OSX) | |
# ssh | |
cp -R .ssh to ~/ | |
chmod 600 * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Oh-my-posh for Windows Terminal (including Powershell , Git Bash) -> | |
https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup#customize-your-powershell-prompt-with-oh-my-posh | |
1/ winget install JanDeDobbeleer.OhMyPosh | |
2/ new-item -type file -path $profile -force | |
3/ notepad $PROFILE | |
4/ Paste: oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\night-owl.omp.json" | Invoke-Expression | |
5/ For Git Bash: edit .bashrc file | |
-> Paste: eval "$(oh-my-posh init bash --config $POSH_THEMES_PATH/night-owl.omp.json)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment