Skip to content

Instantly share code, notes, and snippets.

View ludndev's full-sized avatar
💭
I may be slow to respond.

Judicaël AHYI ludndev

💭
I may be slow to respond.
View GitHub Profile
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-08
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor.
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively.
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth.
@ludndev
ludndev / architecture.md
Created August 26, 2025 11:00 — forked from LcsGa/architecture.md
Architecture angular

L'architecture du projet se découpe en deux grandes catégories :

  • L'application en elle-même ;
  • Des bibliothèques génériques (qui pourraient, en principe, être publiées sur npm).

Concentrons-nous sur l'application. Elle se découpe en trois modules principaux et un sous-module :

  • common
  • feature
  • feature/shared (le sous-module)
@ludndev
ludndev / archlinux-qemu-kvm.md
Created August 26, 2025 10:59 — forked from eujuliu/archlinux-qemu-kvm.md
QEMU-KVM Installation for Arch Linux

QEMU-KVM in Arch Linux

Check Virtualization Support

lscpu | grep -i Virtualization
  • VT-x for Intel
  • AMD-Vi for AMD

Ensure that your kernel includes KVM modules

@ludndev
ludndev / ANSI.md
Created August 26, 2025 10:56 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ludndev
ludndev / prisma.ts
Created August 21, 2025 19:47 — forked from gamedevsam/prisma.ts
NestJS Prisma server with an extension to log all queries
import { Global, INestApplication, Injectable, Logger, Module, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
import { Prisma, PrismaClient } from '@prisma/client';
import { ITXClientDenyList } from '@prisma/client/runtime/library';
import { PRISMA_ORM_LOG_LEVEL, PRISMA_SQL_LOG_LEVEL } from '~/server_config';
export type PrismaTransaction = Omit<PrismaClient, ITXClientDenyList>;
const logger = new Logger('prisma');
export const logQueriesExtension = Prisma.defineExtension((client) => {
await new Promise(function (resolve) {
setTimeout(function () {
resolve();
}, 1000);
});
// ... Can be shortened to:
await new Promise(function (resolve) {
setTimeout(resolve, 1000);
@ludndev
ludndev / kick-all-from-google-meet.js
Created September 4, 2024 06:56 — forked from RoryDuncan/kick-all-from-google-meet.js
Script for kicking all users from a google meet call
(() => {
let thenKickSelf = window.confirm("Kick yourself too?");
const wait = (ms) => new Promise(resolve => window.setTimeout(resolve, ms));
const click = (el) => (el.click(), wait(260));
const confirm = () => click(document.querySelector(`[data-id="EBS5u"]`));
const buttons = Array.from(document.querySelectorAll(`[data-tooltip="Remove from meeting"]`));
const kickSelf = () => document.querySelector(`[data-tooltip="Leave call"]`).click();
let init = wait(0);
@ludndev
ludndev / benchmark.py
Created July 26, 2024 09:02 — forked from dtornow/benchmark.py
Batching Benchmark
import sqlite3
import time
import os
def create_table(conn):
conn.execute('''CREATE TABLE IF NOT EXISTS benchmark (id INTEGER PRIMARY KEY, value TEXT)''')
conn.commit()
def non_batched_insert(conn, n):
for i in range(n):
@ludndev
ludndev / genpw.js
Created July 15, 2024 20:09 — forked from kitihounel/genpw.js
Funny little NodeJS script to generate passwords
/**
* This is a small program used to generate passwords given an alphabet and a target length.
*
* A bit of math and programming.
* We have an alphabet of size A and we want a password of length P.
* We need to generate an integer bound by (A^P) and convert it to base A using the standard base
* conversion algorithm with our alphabet symbols as the digits.
*
* (A^P) is our upper bound because (A^P) has P+1 digits in base A and we need P digits (symbols).
* For example, in base 10, 10^2 = 100 has 3 digits. In base 2, 16 = 2^4 = 10000 has 5 symbols, etc.
@ludndev
ludndev / fmod.js
Created November 3, 2023 12:27 — forked from wteuber/fmod.js
fmod for Javascript, will work with any ECMA-262 implementation.If you need a precision higher than 8, please use another implementaion of fmod.
/*
fmod for Javascript, will work with any ECMA-262 implementation.
If you need a precision higher than 8, please use another implementation of fmod.
1.05 % 0.05
=> 0.04999999999999999
Math.fmod(1.05, 0.05)
=> 0