Skip to content

Instantly share code, notes, and snippets.

View acfatah's full-sized avatar
🚀
Looking for a new opportunity

Achmad F. Ibrahim acfatah

🚀
Looking for a new opportunity
View GitHub Profile
@acfatah
acfatah / bash_strict_mode.md
Created April 1, 2023 02:33 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u

JavaScript Modules

  1. How do I make the tree shakeable?
  2. What JS module systems should I target (CommonJS, AMD, ES6).
  3. Should I transpile the source?
  4. Should I bundle the source?
  5. What files should I publish?

Let's try to address all the above questions now.

@acfatah
acfatah / acfatah Git Activities
Last active September 4, 2024 10:14
Gist Image Hosting
# Gist Image Hosting on Comment
@acfatah
acfatah / bun-lint-test-typecheck.yml
Created March 7, 2025 00:09 — forked from morajabi/bun-lint-test-typecheck.yml
Bun test, lint, and typecheck your Bun project in GitHub actions with caching
# .github/workflows/test.yml
on:
push:
branches:
- main
pull_request:
branches:
- main