Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing :)

evan.kim zacscoding

🎯
Focusing :)
View GitHub Profile
@zacscoding
zacscoding / zap_logger.go
Last active Sep 29, 2020
logger to use package level
View zap_logger.go
package logger
import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
var delegate *zap.SugaredLogger
func init() {
View properties.md
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
You can’t perform that action at this time.