Use this function to create a timed delay. This is for things like stubbing APIs in development.
function delay(timeInMs) {
await new Promise((resolve) => setTimeout(resolve, timeInMs));
}
This will remove all deleted remote branches and remove local branches that are tracking a deleted remote branch. This is borrowed from here.
By default, Spring Boot applications are built as stand-alone executable JARs with an embedded Tomcat. With some additional configuration, a Spring Boot application can be built as a WAR file to deploy to an existing Tomcat, or other servlet container, instance.
These steps can be used to set up a project that can switch easily between building a stand-alone JAR or a WAR for deployment by specifying a Maven profile when building the deployment package. Notes are provided for cases that use other available servlet containers (Jetty and Undertow).
After setting up a new Ubuntu Linux VM and logging in for the first time, copy/paste the following command to update the OS and tools, install Docker CE, install Docker Compose, set the Docker service to automatically start when the OS starts, and add yourself to the Docker group so that you can execute Docker commands. Immediately after submitting this command, you may be prompted for your password. After that, the process will run completely unattended, and will end with a reboot of the VM.
$ sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && sudo apt-get update && sudo apt-get install -y docker-ce && sudo usermod -aG docker $USER && sudo systemctl enable docker && sudo curl -L https://github.com/docker/compose/releases/down