Skip to content

Instantly share code, notes, and snippets.

View Translucent504's full-sized avatar

Shayaan Ahmed Farooqi Translucent504

View GitHub Profile
@atinux
atinux / async-foreach.js
Last active April 2, 2025 11:34
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active October 10, 2025 13:30
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@appden
appden / pronto2broadlink.py
Last active June 30, 2025 19:27
Convert Pronto IR hex codes to LIRC pulses then Broadlink packets compatible with python-broadlink