'잡동사니'에 해당되는 글 13315건

  1. 2020.01.21 vscode git 플러그인
  2. 2020.01.21 git commit 간 diff
  3. 2020.01.20 open refine memory 설정
  4. 2020.01.20 async와 non block
  5. 2020.01.20 node.js promise
  6. 2020.01.19 출근길 일기? 2
  7. 2020.01.19 시소러스 (thesaurus)
  8. 2020.01.19 kvm cpuinfo proc hide
  9. 2020.01.19 node.js cookie 관련 함수들
  10. 2020.01.19 node.js crypto 모듈
Microsoft/vscode2020. 1. 21. 17:26

git lens는 가장 많은 사용자가 이용하긴 하지만 익숙치 않았던지라 포기했었고

(지금도 git 개념을 다 이해한건 아니지만..)

 

당장 가장 목마른 기능은

revision(그러니까 commit)간 소스코드의 변경 내역!

 

svn 쓸때는 tortoiseSVN에서 잘 꾸며놔서 편하게 쓰던 기능인데

git으로 와서는 가장 필요한데 못쓰고 있는 기능이라고 해야하려나?

 

과거 버전을 눌러서 비교하면

해당 버전과 해당 버전 하나더 과거의 버전(N , N-1 버전의 비교)의 소스를 비교하거나

해당 버전과 현재 workspace의 소스를 비교하는 기능을 추가해준다.

 

아무튼.. 플러그인 하나로 가장 가려웠던 부분을 커버할 수 있어서 좋네.

 

[링크 : https://vscode.tistory.com/entry/Git-History]

[링크 : https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory]

Posted by 구차니

한자리씩 줄여보니 4자리는 넘어야 commit hash 로 비교가 가능하다.

아래는 두 커밋간의 비교인데 diff 출력으로 나오게 되어있고

 

git diff oldCommit newCommit 
git diff k73ud dj374 

[링크 : https://stackoverflow.com/questions/3368590/show-diff-between-commits]

 

아래는 리비전간에 변화가 생긴 파일 목록만 나타내는 옵션을 사용한 예이다.

git diff --name-only HEAD~10 HEAD~5

[링크 : https://stackoverflow.com/.../how-to-list-only-the-file-names-that-changed-between-two-commits]

 

 

두 커밋간의 특정 파일을 비교하려면 마지막에 파일이름만 넣으면 된다.

$ git diff HEAD^^ HEAD main.c
$ git diff HEAD^^..HEAD -- main.c
$ git diff HEAD~2 HEAD -- main.c

[링크 : https://stackoverflow.com/.../how-do-i-diff-the-same-file-between-two-different-commits-on-the-same-branch]

 

 

+

git help diff로 하니 나오는 내용. 세번째 명령이 내가 원하는 명령어.

git diff [<options>] [<commit>] [--] [<path>…​]
git diff [<options>] --cached [<commit>] [--] [<path>…​]
git diff [<options>] <commit> <commit> [--] [<path>…​]
git diff [<options>] <blob> <blob>
git diff [<options>] --no-index [--] <path> <path>
Posted by 구차니

흐음.. 아무튼 8기가 노트북에서 하나 16기가 서버에서 하나

기본값은 1400MB만 쓰도록 잡혀있는 것으로 보인다.

 

~/work/src/openrefine-3.2$ ./refine 
You have 7870M of free memory.
Your current configuration is set to use 1400M of memory.
OpenRefine can run better when given more memory. Read our FAQ on how to allocate more memory here:
https://github.com/OpenRefine/OpenRefine/wiki/FAQ:-Allocate-More-Memory
Starting OpenRefine at 'http://127.0.0.1:3333/'

18:52:18.859 [            refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
18:52:18.862 [            refine_server] refine.memory size: 1400M JVM Max heap: 1407188992 (3ms)

 

[링크 : https://github.com/OpenRefine/OpenRefine/wiki/FAQ:-Allocate-More-Memory]

'프로그램 사용 > openrefine' 카테고리의 다른 글

openrefine web scraping  (0) 2020.02.03
openrefine 설명서  (0) 2020.01.23
Posted by 구차니

non block은 async한 동작을 하는 방법중에 하나지만

non block이라고 해서 반드시 async 하다고 할 순 없다라...

 

Thread 등으로 blocking 작업을 분리해서 async하게 할 수도 있기에

 

asynchronous와 non-blocking이 동일한거라고 볼 순 없다고 하는데

이해할듯 하면서 더 어려운 말이네...

 

[링크 : https://tech.peoplefund.co.kr/2017/08/02/non-blocking-asynchronous-concurrency.html]

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

smmu?  (0) 2020.09.08
zmmu gen-z  (0) 2020.09.07
EAV - Entitiy Attribute Value  (0) 2019.12.15
ETL - Extract Transform Load  (0) 2019.12.11
SAS expander  (0) 2019.11.02
Posted by 구차니
Programming/node.js2020. 1. 20. 16:10

promise는 비동기 작업을 동기작업으로 바꿀수(?)있는 마법의 키워드 이다.

아래와 같이 new promise를 통해서 만들어 주고

return new promise((resolve, reject) => {

// 비동기 작업

// 비동기 작업의 리턴값 (정상)

   resolve(value);

// 비동기 작업 비정상 종료시 리턴값

   reject(value);

})

 

3개의 비동기 작업이 모두 종료되고 그 값을 이용해 무언가를 하려면

promise.all로 구현을 해주고 값을 하나로 합쳐주면 된다.

Promise.all([worker1, worker2, worker3])

.then([value1, value2, value3]) => {

return ({value1, value2, value3})

 

 

[링크 : https://programmingsummaries.tistory.com/325]

[링크 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Promise/all]

[링크 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Promise]

 

구조 분해 할당

[링크 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment]

'Programming > node.js' 카테고리의 다른 글

unserscore 라이브러리  (0) 2020.01.29
node.js 집합연산  (0) 2020.01.23
node.js cookie 관련 함수들  (0) 2020.01.19
node.js crypto 모듈  (0) 2020.01.19
node.js xpath 그리고 boolean  (0) 2019.12.17
Posted by 구차니

아부지 차를 빌려서 배터리나 방전 시켜서

후다닥 충전하고 반납하러 가는 길에 라디오를 들었는데

굿모닝 FM장성규입니다. 일요뮤직드라마에 폭 빠져 버렸다.

 

근데 오늘 내용 자체만으로는 전여친,남친의 결혼식에서 만난

전여친의 남친, 전남친의 여친끼리 눈이 맞아버린 이야기인데

막장인듯 하면서도 무슨 상관있냐라는 느낌

 

아무튼 그 5분? 10분 못들은것 때문에

mbc mini 까지 받아서 다시 들으려고 이 시간까지 기다리다가 겨우 다시 듣네

 

그나저나 오랫만에 라디오를 들으니 좋긴 좋구나..

 

나에게 필요한건

사람의 따스함이 느껴지는 목소리였던걸까..

Posted by 구차니

동의어 유의어 반의어 사전.

음성인식에서 시소로우 라고 하길래 찾아보니 같은건지 다른건진 모르겠다.

아무튼 유의어 들을 음성인식

 

[링크 : http://www.terms.co.kr/thesaurus.htm?ckattempt=1]

[링크 : https://ko.dict.naver.com/seo.nhn?id=23502100]

[링크 : https://blog.naver.com/sgjjojo/221272842350]

[링크 : https://en.wikipedia.org/wiki/Thesaurus]

[링크 : https://terms.tta.or.kr/dictionary/dictionaryView.do?subject=시소러스]

Posted by 구차니

hypervisor에서 설정에 따라 /proc/cpuinfo 의 내용을 숨길수 있는 것으로 보인다.

 

 

[링크 : https://amp.reddit.com/.../6qn7sk/is_it_possible_to_hide_a_vm_from_being_detected/]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm sr-iov nic  (0) 2025.02.23
중첩가상화  (0) 2023.06.16
kvm ubuntu Xorg cpu 100% 문제  (0) 2019.10.10
kvm/qemu 로그 위치  (0) 2019.10.07
kvm core 을 guest에 할당하기(affinity)  (0) 2019.08.28
Posted by 구차니
Programming/node.js2020. 1. 19. 17:17

쿠키를 삭제한다. 단 삭제만 하고 어떠한 응답을 주는것이 아니기에

redirection 등을 추가로 해주어야 클라이언트에서 작동을 인식한다.

res.clearCookie(name [, options])
Clears the cookie specified by name. For details about the options object, see res.cookie().

Web browsers and other compliant clients will only clear the cookie if the given options is identical to those given to res.cookie(), excluding expires and maxAge.

res.cookie('name', 'tobi', { path: '/admin' })
res.clearCookie('name', { path: '/admin' })

[링크 : https://expressjs.com/ko/api.html]

[링크 : https://victorydntmd.tistory.com/35]

 

 

아래 블로그의 path는 optional 이기에 굳이 넣어주지 않아도 된다.

app.get('/logout', function(req,res) {
    res.clearCookie(key);
});

 

app.get('/logout', function(req,res) {
    res.clearCookie(key, {path:'/path'});
});

[링크 : https://kwanghyuk.tistory.com/90]

'Programming > node.js' 카테고리의 다른 글

node.js 집합연산  (0) 2020.01.23
node.js promise  (0) 2020.01.20
node.js crypto 모듈  (0) 2020.01.19
node.js xpath 그리고 boolean  (0) 2019.12.17
node.js JWT with refresh token  (0) 2019.12.10
Posted by 구차니
Programming/node.js2020. 1. 19. 16:42

DB에서 하는거나 was에서 하는거랑 좀 차이가 있다면 있을수 있지만

postgresql의 경우 crypto 모듈을 설치해야 하는 문장 하나를 관리해줘야 하니

보안상 문제나 구조적 문제가 없다면 WAS에서 처리하는 것도 나쁘진 않다는 생각이 든다.

 

crypto 모듈은 기본 모듈이라 npm install을 해주지 않아도 된다.

const crypto = require('crypto');

const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
                   .update('I love cupcakes')
                   .digest('hex');
console.log(hash);
// Prints:
//   c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e

 

[링크 : https://nodejs.org/api/crypto.html]

 

+

[링크 : https://victorydntmd.tistory.com/33]

'Programming > node.js' 카테고리의 다른 글

node.js promise  (0) 2020.01.20
node.js cookie 관련 함수들  (0) 2020.01.19
node.js xpath 그리고 boolean  (0) 2019.12.17
node.js JWT with refresh token  (0) 2019.12.10
node.js synchornous file write  (0) 2019.11.06
Posted by 구차니