Skip to content

Instantly share code, notes, and snippets.

View zacscoding's full-sized avatar
🎯
Focusing :D

zac.kim zacscoding

🎯
Focusing :D
View GitHub Profile
@zacscoding
zacscoding / zap_logger.go
Last active September 29, 2020 01:30
logger to use package level
package logger
import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
var delegate *zap.SugaredLogger
func init() {
@zacscoding
zacscoding / properties.md
Created January 17, 2020 01:42
my properties :)
@zacscoding
zacscoding / docker-composes.md
Last active October 1, 2019 14:49
docker compose

docker-compose

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

Index

@zacscoding
zacscoding / sh.md
Created March 5, 2019 05:06
shell script snippet
@zacscoding
zacscoding / boot_stop.sh
Created January 31, 2019 01:38
boot jar stop shell script
```
#!/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 January 31, 2019 01:37
spring boot jar start shell script
```
#!/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 January 16, 2019 01:16
HttpServlet helper. extract HttpServletRequest from current thread
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 December 28, 2018 06:21
bitbucket : fetch pull requests to local repository