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 = {};
@FridayCandour
FridayCandour / custom-select-dropdown-css-js.markdown
Created August 28, 2023 09:50
Custom-select-dropdown-CSS+JS