This file contains 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 setup | |
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/docker.list | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt update | |
sudo apt install docker-ce docker-ce-cli containerd.io pigz | |
#execution permission | |
sudo usermod -aG docker $USER | |
#docker compose |
This file contains 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 asyncFunction(x) { | |
return new Promise(function (resolve, reject) { | |
if(typeof x === 'number' && !isNaN(x)){ | |
resolve( x * x) | |
} else { | |
reject(new Error('It\'s not a number')) | |
} | |
}) | |
} |
This file contains 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
(async function () { | |
const a = await asyncFunction(2) | |
const b = await asyncFunction(a) | |
const c = await asyncFunction(b) | |
const d = await asyncFunction(c) | |
console.log(d); | |
})() | |
function asyncFunction(x, fn){ | |
return new Promise(function (resolve, reject) { |
This file contains 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
export { default } from './fileToExport'; | |
export { default as NewNameToCachOnCurlyBraces } from './fileToExport'; | |
import { NewNameToCachOnCurlyBraces } from './fileToImport' | |
another way | |
export * from './module'; | |
module index file |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Example templates</title> | |
</head> | |
<body> | |
<div id="app" v-cloak> |