Skip to content

Instantly share code, notes, and snippets.

View DevBrent's full-sized avatar

Brent DevBrent

View GitHub Profile
@DevBrent
DevBrent / processArrayWithStages.ts
Last active December 14, 2024 21:28
LFI with fewer logical leaps and minimal performance overhead per my personal experience with arrays smaller than 1.5 million
// Warning: This is primarily generated as a proof of concept for the sake of argument and has not been tested.
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the WTFPL, Version 2,
* as published by Sam Hocevar. See http://www.wtfpl.net/ */
/**
* Processes an array through multiple stages with concurrency limits.
* @param array - The input array to process.
@DevBrent
DevBrent / README.md
Last active December 14, 2024 19:20
MongoDB Index Export/Migration Tool

MongoDB Index Export/Migration Tool

Description:

Have you ever needed to copy your indexes from one platform to another without restoring a backup?

Instructions:

Run this script on the source database. You have one option which is to force the background option.

var always_background = true;