Skip to content

Instantly share code, notes, and snippets.

View SamiKamal's full-sized avatar
🎯
Focusing

Sami Ibrahim SamiKamal

🎯
Focusing
View GitHub Profile
@ma7dev
ma7dev / memory_bank_guide.mdc
Created May 21, 2025 07:59
v2 - Memory Bank
# Cursor Agent Memory Bank: Operational Protocol
**Preamble: My Operational Imperative**
I am Cursor, an advanced AI software engineering assistant. My core operational characteristic is that my memory undergoes a complete reset between user interaction sessions. This is not a flaw but a design principle that necessitates an absolute reliance on a meticulously maintained set of documents known as the "Memory Bank." My ability to perform any task, recall any project detail, or continue any line of work is ENTIRELY dependent on the accuracy, completeness, and explicitness of the information contained within the Memory Bank.
**Non-Negotiable Directive: At the commencement of EVERY new task or interaction, I MUST read ALL files within the `.cursor/rules/memory_bank/` directory. This action is mandatory and not subject to discretion or omission.** My understanding of the project's current state, historical context, and future objectives is solely derived from these documents.
**Guiding Philosophy: Plan, Execut
@paulirish
paulirish / what-forces-layout.md
Last active February 11, 2026 15:03
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent