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 = { | |
// forcing the creation of an index.html for every page to allow | |
// providers serving pages without having to add .html to the url | |
exportPathMap: async function (defaultPathMap) { | |
const pathMap = {}; | |
for (const [path, config] of Object.entries(defaultPathMap)) { | |
if (path === "/") { | |
pathMap[path] = config; | |
} else { |
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 gifters = [ | |
"Maxime", | |
"Joffrey", | |
"Quentin", | |
"Delphine", | |
"Cécile", | |
"Tatie Solange", | |
"Svetlana" | |
]; | |
const gifted = []; |
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
/* | |
* Multiplication of a huge amount of numbers throught Web Workers | |
* The goal is: | |
* - to measure performance earnings | |
* - to implement and try 'Inline' and 'Waitable' Web Workers | |
*/ | |
/* tsconfig.json | |
{ | |
"target": "ESNext", |
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
// ----- | |
// development utils | |
// ----- | |
// just a formatted console.log | |
const log = (...args: any[]) => console.log(`=> ${args.join(' ')}`); | |
// logs and returns the exact given argument | |
const tapLog = (x: any): any => { | |
log(x); |
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
abstract class Monad<T> { | |
protected value: T; | |
public abstract map(f: Function): Monad<T>; | |
public abstract flatMap(f: Function): Monad<T>; | |
} | |
type Effect<T> = () => T; | |
class IO<T> extends Monad<Effect<T>> { | |
constructor(val: Effect<T>) { |
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
abstract class Monad<T> { | |
protected value: T; | |
public abstract map(f: Function): Monad<T>; | |
public abstract flatMap(f: Function): Monad<T>; | |
} | |
enum EitherType { | |
Left = "Left", | |
Right = "Right" | |
} |
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
abstract class Monad<T> { | |
protected value: T; | |
} | |
class Maybe<T> extends Monad<T> { | |
constructor(val: T | null) { | |
super(); | |
this.value = val; | |
} |
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
{ | |
"ascii_chars": [{ | |
"code": 0, | |
"char": "NULL" | |
}, | |
{ | |
"code": 1, | |
"char": "SOH" | |
}, | |
{ |
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
# !usr/bin/python | |
# coding: utf-8 | |
# author: mdubourg001 : https://github.com/mdubourg001 | |
import random | |
import base64 | |
import struct | |
import sys | |
from random import randrange |