Skip to content

Instantly share code, notes, and snippets.

View ManUtopiK's full-sized avatar
:octocat:
Ready to code.

Emmanuel Salomon ManUtopiK

:octocat:
Ready to code.
View GitHub Profile
@apurvajain
apurvajain / Commit_Message.md
Last active May 20, 2025 04:25
Commit Message Template

Commit Message Convention

type(scope): subject 

<body>
<footer>

1. Type of commit

@osaxma
osaxma / hasura_postgres_docker_notes.md
Last active December 4, 2021 20:59
Notes on working with Hasura, Postgres and Docker in local development
<!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>
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)
@Eomm
Eomm / stress-memory.js
Created August 19, 2020 12:03
Check when your server goes out of memory
/**
* 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())
class HashMap {
constructor() {
this.map = {}
}
hash(k) {
return k % 10
}
class Node {
constructor(value) {
this.value = value
this.links = []
}
linkTo(node, weight) {
this.links.push(new Link(this, weight, node))
}
module.exports = class Stack {
data = []
maxSize
constructor(initialData, maxSize = -1) {
this.data = Array.isArray(initialData) ? initialData : (typeof initialData == "undefined" ? [] : [initialData])
this.maxSize = maxSize
}
isFull() {
const Stack = require("./stack.js")
class Operation {
constructor(val) {
this.value = val
}
}
class Add extends Operation {
class Queue {
data = []
maxSize
constructor(initialData, maxSize = -1) {
this.data = Array.isArray(initialData) ? initialData : (typeof initialData == "undefined" ? [] : [initialData])
this.maxSize = maxSize
}
isFull() {