Skip to content

Instantly share code, notes, and snippets.

@aehlke
aehlke / index.html
Last active July 7, 2025 18:58 — forked from nolanlawson/index.html
Test async getBoundingClientRect with IntersectionObserver vs rAF + gBCR
<!doctype html>
<html lang="en">
<head>
<title>IntersectionObserver vs getBoundingClientRect (50,000 elements)</title>
<style>
#theContainer { width: 100vw; max-width: 100%; }
.test-elem { margin:1px; display:inline-block; width:10px; height:10px; background:#ddd; }
</style>
</head>
<body>
@aehlke
aehlke / gist:992798
Created May 26, 2011 08:53 — forked from jamesmacaulay/gist:860763
zsh hooks to growl completion of long-running commands
# long-running command growler
# hooks for zsh, built on bash version at http://hints.macworld.com/article.php?story=20071009124425468
preexec_functions+='save_preexec_time'
save_preexec_time() {
export PREEXEC_CMD="$(history $HISTCMD | sed 's/ *[0-9]* *//')"
export PREEXEC_TIME=$(date +'%s')
}
precmd_functions+='growl_about_long_running_commands'