Skip to content

Instantly share code, notes, and snippets.

@jbratu
jbratu / CS_SAVE_SELECTED_ATTACHED_TABLES.oibp
Last active June 23, 2021 14:01
Given a list of UNC prefixes of tables and volumes that are currently attached in OpenInsight it will list out those tables and save them to a data structure that is suitable for reattaching with code.
Function CS_SAVE_SELECTED_ATTACHED_TABLES(void)
/*
Usage:
Run routine To parse the list of attached tables that meet the specified
criteria In FilterByUNCPrefix and save the list
To an OS file In a form that is suitable For copying And pasting into
source code For re-attaching the same list of tables.
*/
*Location to save the generated list of attached tables
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active July 22, 2024 09:05
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem