Skip to content

Instantly share code, notes, and snippets.

View Pwuts's full-sized avatar

Reinier van der Leer Pwuts

View GitHub Profile
@Pwuts
Pwuts / list-prs-for-path.sh
Last active April 27, 2023 12:52
List pull requests that touch/change a specified file or path
#!/bin/bash
# dependencies: jq, gh
if [ -z "$1" ]; then
echo "Usage: list-prs-for-path PATH [branch]";
echo "Lists all PRs touching files starting with PATH";
exit 1;
fi
@Pwuts
Pwuts / recursive-readonly.ts
Created February 2, 2021 12:26
Typescript RecursiveReadonly utility
export type RecursiveReadonly<T extends object> = Readonly<{
readonly [key in keyof T]:
T[key] extends object
? T[key] extends BigInt | Date | Number | Symbol ? T[key] : RecursiveReadonly<T[key]>
: T[key]
}>