Skip to content

Instantly share code, notes, and snippets.

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
// AuthForm.tsx
import { FC, FormHTMLAttributes, useCallback } from 'react'
import { Button, LinkItem, Input } from '../UI'
import { FieldValues, useForm } from 'react-hook-form'
import { useAppDispatch } from '../../hooks/reduxHooks'
import { signinUser, signupUser } from '../../store/slices/userSlice'
import { zodResolver } from '@hookform/resolvers/zod'
import { LoginSchemas } from '../../schemas/formValidation'
import { IUserLogin, IUserSignup } from '../../types/IUser'
@mrdarkside
mrdarkside / what-forces-layout.md
Created February 23, 2023 05:47 — forked from paulirish/what-forces-layout.md
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
@mrdarkside
mrdarkside / mac_mouse.txt
Last active February 4, 2022 07:29
mac os mouse acceleration off
defaults write .GlobalPreferences com.apple.mouse.scaling -1 //then reboot
//status
defaults read .GlobalPreferences com.apple.mouse.scaling
//default value
defaults write .GlobalPreferences com.apple.mouse.scaling 2
@mrdarkside
mrdarkside / GLSL-Noise.md
Created February 25, 2021 00:05 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
pragma solidity ^0.6.2;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.1.0/contracts/token/ERC20/ERC20.sol";
contract Token is ERC20 {
constructor () public ERC20("Token", "TKN") {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
}
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";
contract Token is ERC20, ERC20Detailed {
constructor () public ERC20Detailed("Token", "TKN", 4) {
_mint(msg.sender, 900000000 * (10 ** uint256(decimals())));
}
* { outline: 2px dotted red; }
* * { outline: 2px dotted green; }
* * * { outline: 2px dotted orange; }
* * * * { outline: 2px dotted blue; }
* * * * * { outline: 1px solid red; }
* * * * * * { outline: 1px solid green; }
* * * * * * * { outline: 1px solid orange; }
* * * * * * * * { outline: 1px solid blue; }