Skip to content

Instantly share code, notes, and snippets.

View Ray-56's full-sized avatar
🌴
On vacation

56 Ray-56

🌴
On vacation
View GitHub Profile
@Ray-56
Ray-56 / stuns
Created January 12, 2024 06:29 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@Ray-56
Ray-56 / async-await-forEach-alternatives.md
Created December 22, 2021 12:49 — forked from joeytwiddle/async-await-forEach-alternatives.md
Do not use forEach with async-await

Do not use forEach with async-await

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

The problem

Array.prototype.forEach is not designed for asynchronous code. (It was not suitable for promises, and it is not suitable for async-await.)

For example, the following forEach loop might not do what it appears to do: