Skip to content

Instantly share code, notes, and snippets.

View jungbin-kim's full-sized avatar

Jungbin Kim jungbin-kim

View GitHub Profile

관심 분야

  • web front end
  • server application play for scala
  • vr
  • ar
@jungbin-kim
jungbin-kim / Dockerfile-For-oraclelinux7.2withJre8
Last active October 31, 2017 11:14
docker for MacOS by Brew
#
# Set up oracle linux 7.2 with JRE 8
# Pull base image
FROM oraclelinux:7.2
MAINTAINER JB <jungbin.kim@letsee.io>
ENV JRE_VERSION 8u151
ENV JRE_BUILD_NUM b12

용어(Terminology)

pip

패키지 매니저

virtualenv

가상 개발 환경 virtualenv는 고립된 Python 환경들을 만들어주는 도구이다.

npm

npm을 이용하여 dependency library 추가

# --save 옵션을 통하여 package.json에 자동으로 추가 시켜줌
$ npm install {dependecy library name} --save

npm-package-locks

npm install을 할 경우, 패키지 내에 설정한 library의 버전들을 고정시켜주는 역할로 이해됨

git stash

설명

working directory와 그 index의 현재 상태를 저장을 하지만, 다시 깨끗한 working directory로 돌아가고 싶을 때 git stash를 사용한다.

주로 작업하는 도중 새로 push된 사항이 있을 경우, 이 명령어를 써서 clean 상태로 만든 뒤, pull 받아 코드 상태를 업데이트하고 다시 작업 사항을 반영한다.

사용법

# 현재 상태 임시 저장 git stash = git stash save
$ git stash
@jungbin-kim
jungbin-kim / sbt build project.md
Last active June 9, 2017 11:28
sbt로 스칼라 프로젝트 만들어서 활용

Build definition

build.sbt 파일 내 선언하는 내용 정리

sbt 버전 정의

sbt.version=0.13.15

요구된 버전이 local에서 사용할수 없다면, sbt launcher가 알맞은 버전을 다운 받음. version이 정의가 되어 있지 않으면 sbt launcher가 임의로 골라줌(비추천).

build.sbt의 세팅은 project가 load될때 단 한번 평가되고, 다시 평가하지 않는다.

@jungbin-kim
jungbin-kim / sbt libraries.md
Last active June 12, 2017 11:56
sbt 프로젝트에서 사용한 라이브러리들 정리

SBT 프로젝트에서 사용한 라이브러리들

Typesafe's config

JVM 언어를 위한 Configuration 라이브러리.Github

play framework에서는 보통 conf/application.conf경로 상에 존재하는데 반해, sbt 프로젝트 상에서는 src/main/resources라는 경로에 application.conf를 만들어야 처리할 수 있다. 다른 경로 상에 다른 이름으로 놓으면 별도의 처리를 통해 사용할 수 있다.

라이브러리 설정은 다음과 같음

  • build.sbt

DAO (Data Access Object)

정의

Data Access Object 실질적으로 DB에 접근하는 객체

참고 자료

DAO / VO / DTO란?

@jungbin-kim
jungbin-kim / cropImage.sh
Last active June 14, 2017 09:56
macOS command인 sips를 사용하여 세로로 여러 이미지들이 합쳐진 하나의 이미지를 분리해보려고 하였다. 하지만, 실패함. sips는 crop을 시작하고자 하는 width와 height를 지정할 수 없기 때문임.
#!/bin/sh
[ -z "$1" ] && echo "Usage: $ ./crop360Image {image path} " && exit 1
ImagePath="$1"
ImageWidth=$(sips -g pixelWidth $ImagePath | tail -n1 | cut -d" " -f4)
ImageHeight=$(sips -g pixelHeight $ImagePath | tail -n1 | cut -d" " -f4)
echo $ImageWidth
echo $ImageHeight
OutputPath="./crop360"
if [ ! -d $OutputPath ]
@jungbin-kim
jungbin-kim / SBT Packaging.md
Last active September 25, 2017 09:21
sbt로 만든 프로젝트 packing하는 방법 조사

SBT Native Packager

SBT Native Packager를 사용하여 쉽게 sbt 프로젝트를 패키징할 수 있었다.

SBT Native Packager의 Github 설치 가이드Build 가이드를 참고하면 패키징하고자하는 sbt 프로젝트에 쉽게 적용할 수 있다.

  • project/plugins.sbt 파일 추가 및 다음 내용 적용
    // for autoplugins
    addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0")
  • build.sbt에 원하는 plugin 사용 가능하도록 추가.