This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in service.sh | |
| nohup ./start.sh </dev/null >/dev/null 2>&1 & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #1 make ssh key | |
| cd ~ | |
| ssh-keygen | |
| #2 regist ~/.ssh/id_rsa.pub to github account | |
| cat ~/.ssh/id_rsa.pub | |
| #3 add remote url if already exist repository | |
| git remote set-url origin git@github.com:username/your-repository.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://programmers.co.kr/learn/courses/30/lessons/42576 | |
| function solution(p, c) { | |
| var size = c.length; | |
| // 이렇게 하면 오류 발생 | |
| // p.sort((a,b)=>(a < b)); | |
| // 이렇게 하면 속도 느림 | |
| // p.sort((a,b)=>(a.localeCompare(b))); | |
| // 속도 제일 빠르고 정확함 | |
| p.sort((a,b)=>(a < b ? -1 : (a > b ? 1 : 0))); | |
| c.sort((a,b)=>(a < b ? -1 : (a > b ? 1 : 0))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 생략 | |
| # ~ | |
| # enable color support of ls and also add handy aliases | |
| if [ -x /usr/bin/dircolors ]; then | |
| test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| alias ls='ls --color=auto' | |
| #alias dir='dir --color=auto' | |
| #alias vdir='vdir --color=auto' | |
| alias grep='grep --color=auto' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // From https://gist.github.com/Ibro/262ee343ea3a2a244ec76b44f6723713#file-typescript-intersection-type-simple-ts | |
| // Origin code is error code. So I fix it by referencing https://www.typescriptlang.org/docs/handbook/interfaces.html | |
| interface IStudent { | |
| id: string; | |
| age: number; | |
| } | |
| interface IWorker { | |
| companyId: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker run -it -p 8080:8080 -v "/Users/creco/git/spring-boot-project/spring-boot-project:/root/spring-boot-project" ubuntu | |
| # apt-get update && apt-get install wget -y | |
| # wget -O - https://gist.githubusercontent.com/CreatiCoding/1320bab655cdd04ee53f3dd6aac2d245/raw/ | bash | |
| apt-get install software-properties-common -y | |
| add-apt-repository ppa:webupd8team/java -y | |
| add-apt-repository ppa:cwchien/gradle -y | |
| apt-get update | |
| apt-get install openjdk-8-jdk vim git -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const queryStr2queryObj = | |
| (queryStr) => queryStr !== '' | |
| ? queryStr | |
| .split('&') | |
| .map((e) => ({ [e.split('=')[0]]: e.split('=')[1] })) | |
| .reduce((a, c) => { | |
| return { ...a, ...c }; | |
| }) | |
| : {}; |