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 apt-get install -y curl | |
| curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| OUTPUT="$(npm config get prefix)" | |
| echo "$OUTPUT" | |
| if [ "$OUTPUT" == "/usr/local" ]; then | |
| OUTPUT="$(sudo chown -R $USER /usr/local)" |
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 apt-get install -y mysql-client mysql-server mysql-common |
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
| // It is bad case about using Promise.All | |
| let value = [1,2,3,4,5]; | |
| var promises = []; | |
| for(let i=0;i<5;i++){ | |
| promises.push( | |
| ((data)=>{ | |
| return new Promise((resolve, reject)=>{ | |
| setTimeout(() => { |
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 request = require('request'); | |
| new Promise((resolve, reject)=>{ | |
| console.log(1); | |
| resolve(new Promise((resolve, reject)=>{ | |
| request({url:'http://www.naver.com'},()=>{ | |
| console.log(2); | |
| resolve(3); | |
| }); | |
| })); | |
| }).then(data=>{ |
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 <stdio.h> | |
| int main(){ | |
| printf("hello world!\n"); | |
| return 0; | |
| } |
NewerOlder