Skip to content

Instantly share code, notes, and snippets.

import collections
horiz_edges = [
[">", "<", ">", ">"],
["<", " ", "<", ">"],
[">", ">", "<", " "],
["<", " ", ">", "<"],
[" ", " ", ">", ">"],
]
assert len(horiz_edges) == 5
cmake_minimum_required(VERSION 3.12)
# A reproduction of the example given in
# https://cmake.org/cmake/help/latest/command/target_link_libraries.html#linking-object-libraries
project(CMakeTest)
# Object Libraries may be used as the <target> (first) argument of target_link_libraries to specify dependencies of their sources on other libraries. For example, the code
add_library(A SHARED a.c)
target_compile_definitions(A PUBLIC A)
@jthemphill
jthemphill / bisect_react_compiler_vite.py
Last active October 30, 2024 17:39
Figure out which files are causing `babel-plugin-react-compiler` to output bad code and crash Vite's Rollup build
import asyncio
import sys
import typing
"""
vite.config.ts has these lines:
function djb2Hash(str: string): number {
let hash = 5381
@jthemphill
jthemphill / bisect_for_multiple_files.py
Last active November 2, 2024 22:59
Version of bisect for if an E2E test passes as long as at least one of multiple affected files is not compiled
import asyncio
import json
import pathlib
import random
import signal
import typing
"""
vite.config.ts has these lines: