Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
out here livin

Amadeus Demarzi amadeus

🕶️
out here livin
View GitHub Profile
@amadeus
amadeus / prettier.json
Created Jan 1, 2019
.prettierrc template
View prettier.json
{
"printWidth": 120,
"trailingComma": "es5",
"bracketSpacing": false,
"singleQuote": true,
"jsxBracketSameLine": true,
"overrides": [
{
"files": ["*.css", "*.styl"],
"options": {
@amadeus
amadeus / lvimrc.vim
Last active Dec 23, 2019
.lvimrc template
View lvimrc.vim
" NOTE: Only source this file once per session
if g:localvimrc_sourced_once
finish
endif
echom '{page} .lvimrc has been sourced'
set tabstop=2
set shiftwidth=2
set expandtab
View mvim
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
@paulirish
paulirish / what-forces-layout.md
Last active Oct 18, 2020
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
You can’t perform that action at this time.