Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# sort list of git repos with gh cli | |
gh repo list --limit 300 --json name -q '.[].name' | sort | |
# count total commits in a repo | |
git rev-list --all --count |
#!/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. |
# 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 |