Skip to content

Instantly share code, notes, and snippets.

View evolutionxbox's full-sized avatar
👀
Trying my hardest

Jonathan Cousins evolutionxbox

👀
Trying my hardest
View GitHub Profile
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
View README.md
@paulirish
paulirish / what-forces-layout.md
Last active March 1, 2024 11:58
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
@chrismccoy
chrismccoy / gitcheats.txt
Last active January 19, 2024 22:17
git cheats
View gitcheats.txt
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
# List all files in a folder in a git repository by last commit date
git ls-tree --name-only HEAD | while read filename; do echo "$(git log -1 --format="%ci " -- $filename) $filename"; done | sort -r
# zip up an archive of each commit
for i in `git log --format=%H`; do git archive $i --format=zip -o $i.zip; done
# zip up an archive of each commit
@pete-otaqui
pete-otaqui / bumpversion.sh
Created December 2, 2012 11:08
Bump a software project's VERSION, add the CHANGES, and tag with GIT
View bumpversion.sh
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@onsails
onsails / .screenrc
Created October 31, 2011 16:59
My .screenrc
View .screenrc
# GNU Screen configuration file
#
# Balaji S. Srinivasan <balajis_at_stanford_dot_edu>
# This file can be found at http://jinome.stanford.edu/stat366/unix/.screenrc
# Modified to play well with emacs, by moving Ctrl-A to Ctrl-T
# Modification of original files by Sven Guckes, Sarunas Vancevicius, and Mike Perry
# Sarunas Vancevicius original: http://www.redbrick.dcu.ie/~svan/configs/screenrc
# Mike Perry original: http://fscked.org/writings/225notes/unix/.screenrc