Skip to content

Instantly share code, notes, and snippets.

View eps1lon's full-sized avatar
:atom:
mt?!" “ .I.r '2 f

Sebastian Silbermann eps1lon

:atom:
mt?!" “ .I.r '2 f
View GitHub Profile
@eps1lon
eps1lon / gh-branch-split
Last active December 6, 2023 09:34
Split branch into one branch per folder
#!/bin/bash
set -e
branchToSplit="feat/react/deprecated-react-node-array"
title="Remove usage of deprecated ReactChild"
message="This PR removes the usage of the deprecated \`ReactChild\` type (see https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/64451)."
mergeBase=$(git merge-base origin/master $branchToSplit)
types=( $(git diff --name-only $mergeBase $branchToSplit | grep -oE 'types/[^/]+/' | cut -d/ -f2 | uniq) )
@eps1lon
eps1lon / react-types-fork-backport.sh
Created May 28, 2023 17:11
react-types-fork-backport
git diff 1a5956fbfda99ad3392a1813bd0822d39c46585f HEAD | sed 's|types/react/|types/react/ts5.0/|' | git apply
@eps1lon
eps1lon / react-dom-test-selectors.md
Last active January 9, 2023 17:26 — forked from bvaughn/react-dom-test-selectors.md
DRAFT NOT FOR SHARE Experimental React DOM test selector API

RFC Test Selectors

Owner: Brian Vaughn, Sebastian Silbermann


As of facebook/react/pull/22760, the experimental Test Selector API is now available in the experimental release channel.

To test the API, first install the experimental release:

@eps1lon
eps1lon / automatic-numbering-ordered-lists.md
Created August 8, 2022 08:52
automatic numbering in markdown ordered lists
  1. first
  2. second
  3. third
@eps1lon
eps1lon / bacon-onion-dip.md
Created January 2, 2022 12:29
Rezept für Bacon-Zwiebel Dip
@eps1lon
eps1lon / README.md
Last active March 2, 2022 07:24
React 18 Working Group work
@eps1lon
eps1lon / getSuccessCriterion.js
Created November 23, 2021 21:56
get all Success Criteria as linked markdown headings
const headings = Array.from(document.querySelectorAll('h1, h2, h3, h4, h5, h6'))
const scHeadings = headings.filter(heading => {
return /^Success Criterion/.test(heading.textContent)
}).map(heading => {
return heading.querySelector('a[aria-label^="Permalink"]')
})
const scMarkdownHeadings = scHeadings.map(e => `### [${e.getAttribute('aria-label').replace(/^Permalink for /, '')}](${e.href})`)
console.log(scMarkdownHeadings.join('\n'))
@eps1lon
eps1lon / rhtl-questions.readme.md
Last active November 6, 2021 11:57
rhtl questions
@eps1lon
eps1lon / README.md
Last active November 21, 2021 21:39
Hightlight visible Suspense boundaries

Highlights server-side rendered Suspense boundaries.

  1. Create Chrome Devtools snippet with content of source file
  2. Run snippet
@eps1lon
eps1lon / README.md
Created October 25, 2021 11:46
Crawl website for 404s

website-link-graph

$ yarn start https://testing-library.com/
link graph:  Map() {
  '/users' => [
    '/',
    '/docs/',
    '/docs/recipes',
    '/help',