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
import crypto from 'node:crypto' | |
class Singleton { | |
private static instance?:Singleton|null | |
constructor() { | |
if (Singleton.instance) return Singleton.instance | |
if (Singleton.instance === undefined) { | |
Singleton.instance = null |
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
/** | |
* Runs the `idempotentFn` for ~4400ms, in an interval | |
* of 50ms - to satisfy `testFn`. If unsatisfied, throws Error(`msg`). | |
* | |
* @param idempotentFn - a function that can be executed ∞ times | |
* without a side-effect. | |
* @param testFn - throw if unsatisfied; if no throw, then return perfectly ✓! | |
* @param msg - error message to throw if no luck at all | |
*/ | |
async function waitAndSee (idempotentFn, testFn, msg) { |
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 <cpy.h> | |
int main() { | |
char* name = new(Str_t); | |
List* ls = new(List_t); | |
bool t = type(ls) == List_t; //true | |
double arr[] = { 1.2, -3.4 }; | |
input(name, "👨🏻💻 Username: "); | |
listAdd(ls, 1.2, -3.4, name); |
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
#!/bin/bash | |
# Copyright 2021 Muhammad <[email protected]> | |
# Compile Vim with huge features and +clipboard. | |
# To yank directly to system clipboard... | |
# vim: set clipboard=unnamedplus | |
# It is advisable that you remove your installation of Vim. | |
# You need +python3 for YouCompleteMe. Don't use Python2. |