Skip to content

Instantly share code, notes, and snippets.

View adnahmed's full-sized avatar
💫
λ

Adnan Ahmed adnahmed

💫
λ
View GitHub Profile
@adnahmed
adnahmed / ultimate-ut-cheat-sheet.md
Created June 7, 2023 14:14 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@adnahmed
adnahmed / esm-package.md
Created April 19, 2023 05:08 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@adnahmed
adnahmed / Documentation.md
Created April 18, 2023 05:12 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs