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
| // 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
| #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
| # 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
| // you can write to stdout for debugging purposes, e.g. | |
| // console.log('this is a debug message'); | |
| function solution(A, K) { | |
| let arr = []; | |
| // write your code in JavaScript (Node.js 8.9.4) | |
| if(A.length === K || K === 0 || A.length === 0){ | |
| return A; | |
| } | |
| for(let i = 0 ; i < K ; i ++ ){ |
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
| #include <cstdio> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <string.h> | |
| #include <iostream> | |
| #include <thread> |
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
| #include <cstdio> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| #include <iostream> |
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
| function printElement(ele, w = 800, h = 400){ | |
| var divContents = document.querySelector(ele).innerHTML; | |
| var printWindow = window.open('', '', `height=${h},width=${w}`); | |
| printWindow.document.write('<html><head><title>NoName</title>'); | |
| printWindow.document.write('</head><body >'); | |
| printWindow.document.write(divContents); | |
| printWindow.document.write('</body></html>'); | |
| printWindow.document.close(); | |
| printWindow.print(); | |
| } |
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
| sudo npm install -g yarn | |
| sudo yarn global add create-react-app | |
| sudo yarn global add express-generator | |
| sudo yarn global add nodemon | |
| sudo yarn global add concurrently | |
| # 에러 발생시 global node_modules 초기화 | |
| # for create-react-app with redux and router | |
| # yarn add redux react-redux | |
| # yarn add react-router-dom |