Skip to content

Instantly share code, notes, and snippets.

@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active Sep 27, 2022
My i3 shortcuts to take screenshots
View i3-shortcuts-screenshot.md

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active Sep 27, 2022
DOM Performance (Reflow & Repaint) (Summary)
View dom_performance_reflow_repaint.md

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.
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active Sep 14, 2022
Everything you need to know about Shadow DOM
View shadow-dom.md

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

@celso
celso / init.vim
Last active Sep 20, 2022
Neovim setup for OSX users
View init.vim
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@btfak
btfak / useHexo.md
Created May 26, 2016
How to use Hexo and deploy to GitHub Pages
View useHexo.md
@paulirish
paulirish / what-forces-layout.md
Last active Sep 27, 2022
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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