Skip to content

Instantly share code, notes, and snippets.

@newman-afk
newman-afk / .eslintrc.json
Last active October 31, 2023 17:32
Explian how am i set up Eslint and Prettier
{
"extends": [
"next/core-web-vitals", // Just for nextjs
"airbnb",
"airbnb-typescript",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json" //Typescript support
},
@newman-afk
newman-afk / VscodeExtentions.md
Last active April 29, 2023 17:37
notes some vscode extensions I need (Frontend、React、NextJs、TailwindCss)
  1. Live Server ———— everyone knows it
  2. Prettier ————— It's better install it locally + globally
  3. ES7 —————— Install it right now!
  4. Better Comments —————— helpful yeah
  5. ESLint —————— Description like Prettier
  6. Import Cost —————— It's feature just like the name
  7. Multiple cursor case preserve —————— Have you ever tried to change a single word in all variable names, but had your camelCase broken? This extension preserves selection case in these situations. It recognises CAPS, Uppercase and lowercase. Works for typing or pasting.
  8. Tabnine —————— AI Autocomplete for Javascript, Python, Typescript, PHP
  9. Tailwind CSS IntelliSense —————— Install it if you are using TailwindCss
  10. Tailwind Shades —————— Get tints and shades of a given color & Get the closest color name to a given hex code
@newman-afk
newman-afk / what-forces-layout.md
Created January 23, 2023 13:14 — 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