Skip to content

Instantly share code, notes, and snippets.

View MuhammadQuran17's full-sized avatar

Muhammad Umar MuhammadQuran17

  • DanAds
View GitHub Profile
@MuhammadQuran17
MuhammadQuran17 / css_talwind.md
Last active October 14, 2025 05:35
css_talwind.md

Css

Css style hirearchy

  1. !important: A special flag that overrides all other rules.
  2. Inline Styles: Styles written directly on the element (e.g., <a style="color: red;">).
  3. ID Selectors: Rules targeting an ID (e.g., #main-button).
  4. Class Selectors, Attribute Selectors, and Pseudo-classes: Rules targeting a class (.button-primary), an attribute ([target="_blank"]), or a state (:hover).
  5. Type Selectors and Pseudo-elements: Rules targeting an HTML tag itself (e.g., a, p, div) or a pseudo-element (::before).
@MuhammadQuran17
MuhammadQuran17 / js_doc.md
Last active March 18, 2026 07:44
Js helpers
Aspect Promise.all Promise.allSettled
Rejects on first failure Yes, stops everything No, waits for all
Result on success Array of values Array of {status: "fulfilled", value: ...}
Result on mixed Rejects with first error Array with fulfilled/rejected statuses
Use case All must succeed (e.g., required API calls) Inspect all outcomes (e.g., optional fetches)

Promise.all rejects immediately if any promise rejects, returning only successful values if all succeed.
Promise.allSettled always resolves after all promises settle (fulfill or reject), providing status for each

@MuhammadQuran17
MuhammadQuran17 / linux_helper.md
Last active January 14, 2025 05:26
Linux helper

How to create SSH key (in terminal $):

$ ssh-keygen -b 2048 -t rsa -C "your.email@company.com"

Start service automatically on every boot (start computer)

sudo systemctl enable [service_name]

Extract tar into executable

sudo tar -xvzf ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin/