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>
import Foundation
import LRUCache
@globalActor
fileprivate actor LRUFileCacheActor {
static var shared = LRUFileCacheActor()
}
#if DEBUG
fileprivate let debugBuildID = UUID()
git describe --exact-match 2> /dev/null || git describe --all --long | perl -pe 's/^heads\///'
@aehlke
aehlke / 1. Wrap-up.md
Created February 1, 2016 19:38
Toronto Hack & Tell Round 5
@aehlke
aehlke / .json
Created September 16, 2015 21:00
behave --dry-run --formatter json.pretty --no-summary
[
{
"elements": [
{
"keyword": "Scenario",
"location": "features/test.feature:3",
"name": "Redacted name of a scenario here",
"steps": [
{
"keyword": "Given",
Feature: Basic Test # features/test.feature:1
Scenario: As a student I should be able to blah blah blah # features/test.feature:26
Given I create a student user # None
And I navigate to the base url # None
Then I should see text Login # None
When I login # None
Then I should see text Courses # None
0 features passed, 0 failed, 0 skipped, 9 untested
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:26
Toronto Hack & Tell Round 3
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:23
Toronto Hack & Tell Round 2 Wrap-up
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:22
Toronto Hack & Tell Round 1
@aehlke
aehlke / gist:2021dd34c91b09da36f1
Last active August 29, 2015 14:19
DI example
class SakaiAPI(object):
def authenticate(self, token):
return requests.post(...).json()
class MockSakaiAPI(SakaiAPI):
def __init__():
self.is_authenticated = True
def authenticate(self, token):