Skip to content

Instantly share code, notes, and snippets.

View FridayCandour's full-sized avatar
🎯
to mars

Friday Candour FridayCandour

🎯
to mars
View GitHub Profile
@FridayCandour
FridayCandour / Xtree.ts
Last active January 15, 2025 06:24
Xtree is an efficient indexing algorithm for distributed data.
class Xtree {
private base: Map<string, any>; // Base storage mapping IDs to data
private nodes: Map<string, Map<any, Set<string>>>; // Nodes for different attributes
constructor() {
this.base = new Map<string, any>(); // ID is now always a string
this.nodes = new Map<string, any>();
}
// Add or update data in the tree
index(id: string, data: Record<string, any>): void {
@FridayCandour
FridayCandour / position.js
Created November 8, 2023 20:31
A node script to position your node projects
#!/usr/bin/env node
import util from "node:util";
import path from "node:path";
import fs from "node:fs";
import child_process from "node:child_process";
// Parse command line arguments
const P_args = process.argv.slice(2);
const seen_p = {};
@alvindera97
alvindera97 / genParenthesis.js
Last active January 25, 2023 13:21
Backtracking Solution For LeetCode 22 (Generate Parenthesis)
function generateParenthesis(n) {
result = new Array();
const backtrack = (op, cp, path = "", stack = new Array()) => {
if (op < 0 || cp < 0) {
return;
}
if (stack.length > 1 && stack.at(-1) === ")" && stack.at(-2) === "(") {
stack = stack.slice(0, stack.length - 2);
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 26, 2025 14:03
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub