Skip to content

Instantly share code, notes, and snippets.

View ahmedshuhel's full-sized avatar

Shuhel Ahmed ahmedshuhel

View GitHub Profile
@ahmedshuhel
ahmedshuhel / .cVimrc
Created July 9, 2019 04:37
cVim Vimrc
" Settings
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
set smoothscroll
@ahmedshuhel
ahmedshuhel / what-forces-layout.md
Created October 7, 2015 12:08 — 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.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()

What are we trying to observe? Raw object data.

// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
 
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
@ahmedshuhel
ahmedshuhel / about.md
Created July 17, 2012 10:41 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer