Skip to content

Instantly share code, notes, and snippets.

🕶

Amadeus Demarzi amadeus

🕶
Block or report user

Report or block amadeus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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
Created Jan 1, 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 Nov 19, 2019
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.

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()
You can’t perform that action at this time.