Skip to content

Instantly share code, notes, and snippets.

dianjuar /
Last active December 1, 2023 14:43
My i3 shortcuts to take screenshots


  • maim
  • xclip


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

# Screenshots
faressoft /
Last active November 22, 2023 10:01
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance


  • 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 /
Last active November 9, 2023 00:49
Everything you need to know about Shadow DOM

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 - 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 / init.vim
Last active April 10, 2023 00:29
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 /
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages
paulirish /
Last active December 1, 2023 15:06
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