Skip to content

Instantly share code, notes, and snippets.

View Cadienvan's full-sized avatar

Michael Di Prisco Cadienvan

View GitHub Profile
@Cadienvan
Cadienvan / list.txt
Created September 17, 2025 13:29
Package Lock Checker
@ahmedhfarag/ngx-perfect-scrollbar
@ahmedhfarag/ngx-virtual-scroller
@art-ws/common
@art-ws/config-eslint
@art-ws/config-ts
@art-ws/db-context
@art-ws/di-node
@art-ws/di
@art-ws/eslint
@art-ws/fastify-http-server
@Cadienvan
Cadienvan / index.js
Created April 3, 2023 15:14
Cache Candidate Example Internals
const { cacheCandidate } = require("@jointly/cache-candidate");
const myFn = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('Hello World');
}, 1000);
});
}
@Cadienvan
Cadienvan / cluster-reverse-proxy.js
Last active February 20, 2023 06:28
How to create a reverse proxy using clusters in Node.js
const cluster = require('cluster');
const http = require('http');
if (cluster.isMaster) {
for (let i = 0; i < 10; i++) {
cluster.fork();
}
let workers = Object.values(cluster.workers)
cluster.on('exit', (worker, code, signal) => {
@Cadienvan
Cadienvan / index.js
Last active February 11, 2023 10:32
Tests about inverted index performances on JS arrays
const linearArray = [];
const testArray = {
// The array that will hold the values
array: [],
// The inverted index
index: {},
// The push function
push: function (value) {
// Push the value to the array