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
import java.util.Arrays; | |
import org.springframework.boot.web.client.RestTemplateBuilder; | |
import org.springframework.cloud.client.loadbalancer.LoadBalanced; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.hateoas.MediaTypes; | |
import org.springframework.hateoas.hal.Jackson2HalModule; | |
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | |
import org.springframework.web.client.RestTemplate; |
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
#!/bin/bash | |
# remove dangling images | |
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi | |
# list container ids created from specified image | |
docker ps -a -f "ancestor=nginx:latest" --format "{{.ID}}" |
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
docker rmi $(docker images -q -f dangling=true) |
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
@ECHO OFF | |
setlocal EnableDelayedExpansion | |
if "%1"=="/s" ( | |
set system=true | |
shift /1 | |
) | |
:execute | |
if "%1"=="" goto usage | |
FOR /f "tokens=*" %%i IN ('docker-machine env --shell cmd %1') DO %%i |
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
rem # GC log | |
set "datetime=%date% %time%" | |
rem # correction for one digit hour | |
if "%datetime:~11,1%" == " " (set datetime=%datetime:~0,10% 0%datetime:~12,7%) | |
set "GC_LOG_FILE=verbosegc-%datetime:~0,4%%datetime:~5,2%%datetime:~8,2%-%datetime:~11,2%%datetime:~14,2%.log" | |
set "GC_OPTS=-verbose:gc -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:-UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1024K -Xloggc:%JBOSS_HOME%\standalone\log\%GC_LOG_FILE%" | |
set "JAVA_OPTS=%JAVA_OPTS% %GC_OPTS%" |
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
package example.junit; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
import org.apache.commons.lang3.StringUtils; |
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
#!/bin/bash | |
echoerr() { echo "$@" 1>&2; } | |
if [ $# -ne 1 ]; then | |
echo "Illegal number of parameters" | |
echo "Usage: " | |
echo " $0 <hostname:port>" | |
exit 1 | |
fi |
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
#!/bin/bash | |
# git prompt inspired by: | |
# http://neverstopbuilding.com/gitpro | |
# colors help: | |
# http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
if [ "$1" == "install" ] ; then | |
WGET_PATH=$(which wget) | |
if [ ! -x "$WGET_PATH" ] ; then |