정부보전 해주던가 200원 올리던가 둘 중 하나뿐인가?

무임승차를 없애고 벌금 상승하면 되는거 아닌가?

 

[링크 : https://news.v.daum.net/v/20190423214835581]

Posted by 구차니

요게.. 람다랑 같은건지 다른건지 모르겠네?

 

[링크 : https://velog.io/@doondoony/javascript-iife]

[링크 : http://chanlee.github.io/2014/01/11/understand-javascript-iife/]

[링크 : http://jdub7138.blog.me/221027225353]

'Programming > javascript & HTML' 카테고리의 다른 글

HTTP 302 redirect  (0) 2019.04.26
closure  (0) 2019.04.24
javascript 배열 초기화(벤치마크)  (0) 2019.04.12
js 난독화  (0) 2019.03.14
HTML video 태그 loop 와 webalizer hit  (0) 2019.02.28
Posted by 구차니
Programming/node.js2019. 4. 23. 18:17

와.. 'undefined' 랑 비교 안해도 되는 저런 멋진 문법?

if('content-length' in ctx.proxyToServerRequestOptions.headers)

[링크 : https://github.com/.../examples/removeProxyToServerContentLength.js]

[링크 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in]

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

pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
proxy error: Error: write after end  (0) 2019.04.23
node.js 시그널 핸들링과 reload  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
Posted by 구차니
Programming/node.js2019. 4. 23. 18:07

흐음.. 왜 안써지냐..

기본 예제로는 response.end(data) 식이었고..

얘는 response.write(data, endcoding); response.end(callback); 두개 문장으로 실행되는 유사한 효과를 준다는데

그럼 되는거 아닌가? ㅠㅠ

 

response.end([data][, encoding][, callback])#

History

This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

If data is specified, it is similar in effect to calling response.write(data, encoding) followed by response.end(callback).

If callback is specified, it will be called when the response stream is finished.

[링크 : https://nodejs.org/api/http.html#http_class_http_serverresponse]

 

 

+

으으 망할.. async 문제인가?

[링크 : https://teamtreehouse.com/community/error-write-after-end-3]

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

node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
node.js 시그널 핸들링과 reload  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
url 끝의 /  (0) 2019.04.17
Posted by 구차니
개소리 왈왈/자전거2019. 4. 23. 17:45

케케케 내일 부터 신청이니 내일 C 로 해야지 ㅋㅋㅋ

 

[링크 : https://www.seoulbikefest.com:9443/index.asp]

'개소리 왈왈 > 자전거' 카테고리의 다른 글

점심의 자전거.. -_ㅠ  (2) 2019.05.28
2019 자전거 대행진 신청!  (2) 2019.04.24
출근길 광고전단 - 바이크파크 + 자전거  (2) 2019.04.03
하루 늦은 지름 신고(?)  (0) 2019.03.17
바 테잎 감음  (0) 2019.03.15
Posted by 구차니
embeded/odroid2019. 4. 23. 13:41

웬지 조만간.. Odroid C2 지르게 되지 않을까 싶네

Amlogic S905 계열은 일단은 HEVC를 지원하는 것으로 보인다.

 

[링크 : https://www.rs-online.com/designspark/5-low-cost-sbcs-that-support-4k-video]

'embeded > odroid' 카테고리의 다른 글

odroid XU4 데스크 탑 설정  (0) 2020.03.08
odroid xu4 AP 관련  (0) 2020.03.07
odroid U3 18.03 업데이트  (6) 2018.09.29
odroid U3 방열판/쿨러  (0) 2018.09.26
odroid U3 eMMC 복구  (0) 2018.09.26
Posted by 구차니
Programming/node.js2019. 4. 23. 13:31

process.on 으로 시그널 핸들러를 연결해두는 듯

 

var cluster = require('cluster');

console.log('started master with ' + process.pid);

//fork the first process
cluster.fork();

process.on('SIGHUP', function () {
  console.log('Reloading...');
  var new_worker = cluster.fork();
  new_worker.once('listening', function () {
    //stop all other workers
    for(var id in cluster.workers) {
      if (id === new_worker.id.toString()) continue;
      cluster.workers[id].kill('SIGTERM');
    }
  });
});

[링크 : https://joseoncode.com/2015/01/18/reloading-node-with-no-downtime/]

[링크 : http://zguide.zeromq.org/js:interrupt]

[링크 : https://stackoverflow.com/questions/20165605/detecting-ctrlc-in-node-js]

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

node.js 항목 확인  (0) 2019.04.23
proxy error: Error: write after end  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
url 끝의 /  (0) 2019.04.17
js array key 삭제하기  (0) 2019.04.16
Posted by 구차니
Linux2019. 4. 23. 13:29

service나 systemctl 을 통해 restart하는거야..

걍 stop + start 하면 되는데 reload는 어떻게 구현되나 궁금해서 검색중

흐음.. 몇개 찾아보는데 SIGHUP을 보내는건가?

 

ExecReload=
Commands to execute to trigger a configuration reload in the service. This argument takes multiple command lines, following the same scheme as described for ExecStart= above. Use of this setting is optional. Specifier and environment variable substitution is supported here following the same scheme as for ExecStart=.

One additional, special environment variable is set: if known, $MAINPID is set to the main process of the daemon, and may be used for command lines like the following:

/bin/kill -HUP $MAINPID
Note however that reloading a daemon by sending a signal (as with the example line above) is usually not a good choice, because this is an asynchronous operation and hence not suitable to order reloads of multiple services against each other. It is strongly recommended to set ExecReload= to a command that not only triggers a configuration reload of the daemon, but also synchronously waits for it to complete.

ExecStop=
Commands to execute to stop the service started via ExecStart=. This argument takes multiple command lines, following the same scheme as described for ExecStart= above. Use of this setting is optional. After the commands configured in this option are run, it is implied that the service is stopped, and any processes remaining for it are terminated according to the KillMode= setting (see systemd.kill(5)). If this option is not specified, the process is terminated by sending the signal specified in KillSignal= when service stop is requested. Specifier and environment variable substitution is supported (including $MAINPID, see above).

Note that it is usually not sufficient to specify a command for this setting that only asks the service to terminate (for example, by queuing some form of termination signal for it), but does not wait for it to do so. Since the remaining processes of the services are killed according to KillMode= and KillSignal= as described above immediately after the command exited, this may not result in a clean stop. The specified command should hence be a synchronous operation, not an asynchronous one.

Note that the commands specified in ExecStop= are only executed when the service started successfully first. They are not invoked if the service was never started at all, or in case its start-up failed, for example because any of the commands specified in ExecStart=, ExecStartPre= or ExecStartPost= failed (and weren't prefixed with "-", see above) or timed out. Use ExecStopPost= to invoke commands when a service failed to start up correctly and is shut down again. Also note that the stop operation is always performed if the service started successfully, even if the processes in the service terminated on their own or were killed. The stop commands must be prepared to deal with that case. $MAINPID will be unset if systemd knows that the main process exited by the time the stop commands are called.

Service restart requests are implemented as stop operations followed by start operations. This means that ExecStop= and ExecStopPost= are executed during a service restart operation.

It is recommended to use this setting for commands that communicate with the service requesting clean termination. For post-mortem clean-up steps use ExecStopPost= instead.

[링크 : https://www.freedesktop.org/software/systemd/man/systemd.service.html]

[링크 : https://serverfault.com/questions/767360/how-to-configure-systemd-to-kill-and-restart-a-daemon-on-reload]

 

+

$ systemctl cat nginx | grep ExecReload= 
Or by running: 

$ systemctl show nginx.service --property=ExecReload 
On my system, I get: 

ExecReload=/usr/bin/kill -HUP $MAINPID

[링크 : https://superuser.com/questions/710986/how-to-reload-nginx-systemctl-or-nginx-s]

'Linux' 카테고리의 다른 글

linux 링크속도 줄이기  (0) 2019.04.25
ip별 대역폭 제한하기  (0) 2019.04.25
ata1 comreset failed (errno=-16)  (0) 2019.04.19
crontab 실행 시간 조절하기  (0) 2019.04.18
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
Posted by 구차니
Programming/Java(Spring)2019. 4. 23. 10:19

maven 에서 repackging 이라는걸로 인해서 이렇게 바뀐다는데

file로 보면 war는 data과 war.original은 zip archive data 라고 되어있는데 무슨 차이인지 감이 안오네..

 

The answer is that you are using repackage goal in your spring-boot-maven-plugin. So, What it does?

Maven first builds your project and packages your classes and resources into a WAR (${artifactId}.war) file.

Then, repackaging happens. In this goal, all the dependencies mentioned in the pom.xml are packaged inside a new WAR (${artifactId}.war) and the previously generated war is renamed to ${artifactId}.war.original.

[링크 : https://stackoverflow.com/.../why-spring-boot-generate-jar-or-war-file-with-original-extention/43641913]

[링크 : https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html]

 

[링크 : http://repackage.org/]

 

Repackages existing JAR and WAR archives so that they can be executed from the command line using java -jar. With layout=NONE can also be used simply to package a JAR with nested dependencies (and no main class, so not executable).

[링크 : https://docs.spring.io/spring-boot/docs/current/maven-plugin/repackage-mojo.html]

 

[링크 : https://preamtree.tistory.com/69]

Posted by 구차니