Skip to content

Instantly share code, notes, and snippets.

View jungbin-kim's full-sized avatar

Jungbin Kim jungbin-kim

View GitHub Profile
@jungbin-kim
jungbin-kim / README.md
Created December 17, 2019 11:09
webpack dev server https 설정

크롬: 연결이 비공개로 설정되어 있지 않습니다

  devServer: {
    https: {
      key: fs.readFileSync('*.key path'),
      cert: fs.readFileSync('*.pem path'),
      passphrase: 'password'
    }
 }
@jungbin-kim
jungbin-kim / index.html
Last active October 3, 2018 06:07
Check OpenCV JS Object HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Check OpenCV JS Object</title>
</head>
<body>
<div id="textDiv">Loading...</div>
<script src="./js/opencv.js"></script>
<script>
@jungbin-kim
jungbin-kim / opencv-webassembly.md
Last active September 18, 2018 06:22
영상 처리 관련 노트

OpenCV 를 WebAssembly 로 빌드하기

Get the emsdk repo

git clone https://github.com/juj/emsdk.git

Enter that directory

cd emsdk

Fetch the latest version of the emsdk (not needed the first time you clone)

@jungbin-kim
jungbin-kim / README.md
Created September 14, 2018 02:56
MacOS 에서 Visual Studio Code로 C++ 설정.

MacOS 에서 Visual Studio Code로 C++ 설정하기

VSCODE 설치

$ brew cask install visual-studio-code

C/C++ Extensions 설치 및 Reload

Build 와 Run task 작성

  • Build 의 결과물인 a.out 을 Run task가 실행하는 구조
@jungbin-kim
jungbin-kim / Future로 비동기.md
Last active September 5, 2018 03:56
자바 공부

CompletableFuture

thenApply 메소드는 비동기 연산 결과로 넘어온 값을 입력으로 받고 처리 후 반환하는 함수를 입력으로 받는다.

	@Test
	public void TestFuture() {
@jungbin-kim
jungbin-kim / Dockerfile
Created August 6, 2018 14:43
ubuntu 14.04 에 elasticsearch 5.x version 설치하는 Dockerfile
FROM mcpayment/ubuntu1404-java8
MAINTAINER mail@jungbin.kim
# repository index 업데이트
RUN apt-get -y -qq update
RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
# Installing from the APT repository
RUN apt-get -y -qq install apt-transport-https
@jungbin-kim
jungbin-kim / restart.sh
Last active July 6, 2018 07:41
Spring boot excutable jar 파일을 Jenkins로 배포하기 위해서 `빌드 후 조치` > Send build artifacts over SSH > Exec command 내용
cd <target path>
# Stop 만들어진 PID로 서비스 종료
pid=`cat ./RUNNING_PID 2> /dev/null`
if [ "$pid" == "" ]
then
printf "Is not running"
else
echo "Stopping..."
sudo kill $pid
@jungbin-kim
jungbin-kim / ExculdeItemOnList.scala
Created June 29, 2018 07:12
특정 item 제외한 리스트 만들기
// excludeNum의 int 값을 제외한 값들을 얻기
val excludeNum = Seq(40501, 40500, 40502, 40527, 40533, 40554, 40566, 40516, 40523)
val range = (40498 to 40574)
val result = range.filterNot(i => excludeNum.contains(i))
@jungbin-kim
jungbin-kim / mapIteration.scala
Created June 27, 2018 01:51
Scala Map iteration
val s = Map(
("Bottle", 355) -> Seq(1,2),
("Can", 500) -> Seq(1,2)
)
for {
((container, volume), value) <- s
} yield {
println(container, volume, value)
container
}
@jungbin-kim
jungbin-kim / README.md
Last active June 26, 2018 06:38
slick tabel mapping 자동 증가 컬럼 대응

오라클 드라이버로는 returning을 사용해서 multiple column을 가져오는 게 가능했는데, MySQL은 왜인지 적용이 안되고, insert문 자체가 실행이 안됨.