Posts

Preserve bash history in multiple terminal windows

Add the following to your  ~/.bashrc : # Avoid duplicates HISTCONTROL=ignoredups:erasedups # When the shell exits, append to the history file instead of overwriting it shopt -s histappend # After each command, append to the history file and reread it PROMPT_COMMAND= " ${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'} history -a; history -c; history -r"

Open source Zapier alternative

https://automatisch.io/?ref=openalternative

Docker "ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network"

Docker may be at its maximum of created networks. The command  docker network prune  can be used to remove all networks not used by at least one container. docker network ls Remove unused docker network

Maven Lifecycle

https://www.scaler.com/topics/maven-lifecycle/

wsl 777 permission bold green color remove

  export LS_COLORS= " $LS_COLORS :ow=1;34:tw=1;34:" source ~/.bashrc

Make your wsl 2 Current Distro Run Systemd

By this installation, systemd is enabled in your WSL 2 distro. Download and run the latest installer script. curl -L -O "https://raw.githubusercontent.com/nullpo-head/wsl-distrod/main/install.sh" chmod +x install.sh sudo ./install.sh install This script installs distrod, but doesn't enable it yet. Enable distrod in your distro You have two options. If you want to automatically start your distro on Windows startup, enable distrod by the following command /opt/distrod/bin/distrod enable --start-on-windows-boot Otherwise, /opt/distrod/bin/distrod enable You can run enable with --start-on-windows-boot again if you want to enable autostart later. Restart your distro Close your WSL's terminal. Open a new Command Prompt window, and run the following command. wsl --terminate Distrod After re-opening a new WSL window, your shell runs in a systemd session

Installing Docker in WSL2

While we  could  use Docker Desktop, we can also run the docker daemon (aka Docker Engine) directly within our WSL2 environment. It's faster, and takes up less system resources using this method. Bonus : This method also works for Windows on ARM users, which at the time of this writing, Docker Desktop is x86-64 only. Enable systemd sudo tee /etc/wsl.conf << EOF [boot] systemd=true EOF exit Restart Shutdown WSL wsl --shutdown Prepare the subnets before you begin Set a predictable IP address for the docker bridge network interface and additional docker subnets. This can save you a lot of grief down the road when docker will inevitably conflict with another subnet on your network. I am going to use 192.168.1.1 as the bridge IP, and allocate the remaining 254 IP addresses (192.168.1.*) for additional IPs in this subnet. https://www.ipaddressguide.com/cidr  is a great utility for converting subnets into the CIDR notation. For example: 192.168.1.1 - 192.168.1.255 = 192....