Skip to content

Instantly share code, notes, and snippets.

View amadeus's full-sized avatar
🕶️
out here livin

Amadeus Demarzi amadeus

🕶️
out here livin
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2024 12:47
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
@amadeus
amadeus / mvim
Created December 3, 2018 02:09
#!/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).
@amadeus
amadeus / lvimrc.vim
Last active December 23, 2019 20:49
.lvimrc template
" 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
@amadeus
amadeus / prettier.json
Last active September 9, 2022 20:03
.prettierrc template
{
"printWidth": 120,
"trailingComma": "es5",
"bracketSpacing": false,
"singleQuote": true,
"bracketSameLine": true,
"overrides": [
{
"files": ["*.css", "*.styl"],
"options": {

Use Tobii Eye Tracker 5 with OpenTrack

Apr 17, 2024 Update

The latest releases of OpenTrack now support Tobii natively, I recommend going that route now instead of this method.

Jan 19, 2023 Update

Thanks to user Henkeman in the comments, I