type(scope): subject
<body>
<footer>
Notes on working with Hasura & Postgres docker containers in a local mac environment.
Table of content:
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<p class="title">Web Assembly Example</p> |
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 decoder = new TextDecoder('utf-8'); | |
let text:string; | |
let lines:string[]; | |
try { | |
text = decoder.decode(await Deno.readFile("./test.txt")) | |
lines = text.split("\n") | |
} catch(e) { | |
console.error(e) | |
Deno.exit(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
/** | |
* node --max-old-space-size=4048 --initial-old-space-size=4048 --max-heap-size=4048 stress-memory | |
* x64 | |
* rss 3.39 GB | |
* heapTotal 3.74 GB | |
* heapUsed 3.73 GB | |
*/ | |
const os = require('os') | |
console.log(os.arch()) |
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
class HashMap { | |
constructor() { | |
this.map = {} | |
} | |
hash(k) { | |
return k % 10 | |
} | |
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
class Node { | |
constructor(value) { | |
this.value = value | |
this.links = [] | |
} | |
linkTo(node, weight) { | |
this.links.push(new Link(this, weight, node)) | |
} |
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
module.exports = class Stack { | |
data = [] | |
maxSize | |
constructor(initialData, maxSize = -1) { | |
this.data = Array.isArray(initialData) ? initialData : (typeof initialData == "undefined" ? [] : [initialData]) | |
this.maxSize = maxSize | |
} | |
isFull() { |
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 Stack = require("./stack.js") | |
class Operation { | |
constructor(val) { | |
this.value = val | |
} | |
} | |
class Add extends Operation { |
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
class Queue { | |
data = [] | |
maxSize | |
constructor(initialData, maxSize = -1) { | |
this.data = Array.isArray(initialData) ? initialData : (typeof initialData == "undefined" ? [] : [initialData]) | |
this.maxSize = maxSize | |
} | |
isFull() { |