Skip to content

Instantly share code, notes, and snippets.

View kapral18's full-sized avatar
:copilot:
Merging with AI

Karen Grigoryan kapral18

:copilot:
Merging with AI
View GitHub Profile
@kapral18
kapral18 / gist:31aa6230a722ed8c0e8f
Last active September 21, 2015 11:59 — forked from paulirish/gist:5558557
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@kapral18
kapral18 / what-forces-layout.md
Last active September 21, 2015 11:55 — 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()

Installation

In order to get support for the clipboard and necessary interpreters, we need to compile and install from source.

# install build dependencies for vim:
sudo apt-get -y build-dep vim

# install some additional, necessary tools:
sudo apt-get -y install checkinstall mercurial python-dev python3.3-dev

clone the latest version of vim source: