Skip to content

Instantly share code, notes, and snippets.

View inside's full-sized avatar

inside

View GitHub Profile
@mthadley
mthadley / .projections.json
Last active October 21, 2022 16:14
A configuration for using vim-projectionist with jest. I was looking for this but couldn't find it anywhere.
{
"**/__tests__/*.js": {
"alternate": "{}.js",
"type": "test"
},
"*.js": {
"alternate": "{dirname}/__tests__/{basename}.js",
"type": "source"
}
}
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
anonymous
anonymous / tmux.conf
Created September 9, 2014 18:35
vim friendly tmux configuration
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected