Skip to content

Instantly share code, notes, and snippets.

View ospatil's full-sized avatar

Omkar Patil ospatil

View GitHub Profile
@ospatil
ospatil / dom_performance_reflow_repaint.md
Created October 4, 2024 11:35 — forked from faressoft/dom_performance_reflow_repaint.md
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.

I have a git repo which compiles into a dist folder and generates a bunch binaries (executables). The binaries and dist folders are .gitignore-ed and hence, are not included in the repo. But I want to distribute a source + binaries snapshot zipfile. I want them to contain:

a) all the sources b) all the binaries c) the dist folder (so that they can tweak it) d) not the .git/ directory, not the hidden files like .cache or node_modules/ etc.

@ospatil
ospatil / prototypes.js
Created June 14, 2022 19:30 — forked from torgeir/prototypes.js
javascript's __proto__ and prototype explained
/**
* __proto__ and prototype
* - the __proto__ property the instance's 'parent' up the prototype chain
* - the prototype property refers what new instances of the type will have their __proto__ set to, i.e. what will be the new instance's 'parent' up the prototype chain
*/
/* Given */
function Object () {}
Object.prototype = {
__proto__: null
@ospatil
ospatil / doc-table.md
Created May 27, 2022 11:05 — forked from antfu/doc-table.md
Doc Table in Markdown

Example

Name

Description


@ospatil
ospatil / script.sh
Last active October 2, 2021 15:36 — forked from lopezjurip/script.sh
Github full code review
# Create empty branch. git switch --orphan <branch name> deletes ALL files from the working tree. We don't want that.
git checkout --orphan review
# or delete only the required files that you need to review. For example, for nats project only delete go source files.
# find . -type f -name '*.go' -not -name '*test.go' -not -path '*/vendor/*' -delete
git rm -rf .
git commit --allow-empty -m "Create empty branch"
git push --set-upstream origin review
# Create `project` branch from `main` current state.
git switch -c project