Skip to content

Instantly share code, notes, and snippets.

zaccoding zacscoding

Block or report user

Report or block zacscoding

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker-composes.md

docker-compose

$ docker-compose -f ./docker-compose.yaml up -d
$ docker logs -f [container_name]

Index

@zacscoding
zacscoding / sh.md
Created Mar 5, 2019
shell script snippet
View sh.md
@zacscoding
zacscoding / boot_stop.sh
Created Jan 31, 2019
boot jar stop shell script
View boot_stop.sh
```
#!/usr/bin/env bash
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
WORKING_DIR=$( cd "${SCRIPT_PATH}/../" ; pwd -P )
VERSION="1.0"
JAR="MY-JAR-${VERSION}.jar"
SERVER_PID_FILE="${WORKING_DIR}/server.pid"
@zacscoding
zacscoding / boot_jar_start.sh
Created Jan 31, 2019
spring boot jar start shell script
View boot_jar_start.sh
```
#!/usr/bin/env bash
SCRIPTPATH=$( cd "$(dirname "$0")" ; pwd -P )
WORKING_DIR=$( cd "${SCRIPTPATH}/../" ; pwd -P )
VERSION="1.0"
JAR="MY-jar-"${VERSION}".jar"
# check server pid
@zacscoding
zacscoding / ServletHelper.java
Created Jan 16, 2019
HttpServlet helper. extract HttpServletRequest from current thread
View ServletHelper.java
import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
/**
* Servlet helper
@zacscoding
zacscoding / bitbucket-pull-requests.md
Last active Dec 28, 2018
bitbucket : fetch pull requests to local repository
View bitbucket-pull-requests.md
@zacscoding
zacscoding / ObjectMapperTest
Created Dec 4, 2018
ObjectMapper naming strategy test
View ObjectMapperTest
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.junit.Test;
/**
* @author zacconding
* @Date 2018-12-04
@zacscoding
zacscoding / RandomSelector.java
Last active Feb 28, 2019
Random access about given item array
View RandomSelector.java
package random;
import java.util.Random;
/**
* Random extraction from items
*
* @author zacconding
* @Date 2018-12-05
* @GitHub : https://github.com/zacscoding
You can’t perform that action at this time.