This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Tuple<L extends number, T extends any[] = []> = | |
T["length"] extends L ? T : Tuple<L, [...T, void]>; | |
type Keys = [ | |
"Z", "Y", "X", "W", "V", "U", "T", "S", "R", | |
"Q", "P", "O", "N", "M", "L", "K", "J", "I", | |
"H", "G", "F", "E", "D", "C", "B", "A" | |
]; | |
type Evil = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pnpm": { | |
"patchedDependencies": { | |
"typescript@5.0.4": "patches/typescript@5.0.4.patch" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
&(?: | |
\w+;| | |
(?:AE|ae|sz)lig| | |
[Aa]ring| | |
[AaEeIiOoUu](?:grave|circ)| | |
[AaEeIiOoUuy]?(?:acute|uml)|Yacute| | |
[AaNnOo]tilde| | |
[AEeIiOoUu]irc| | |
[Cc]?cedil| | |
[lr]aquo| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const inputText = ` | |
yain.tain=1 | |
yain.tether=2 | |
foo=1 | |
foo.bar=2 | |
foo=2 | |
foo.baz=3 | |
bla.bla.bla=jlskdfjlskd.sdlfksldkfj=sldkjlskdf | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Usage like `/sbin/kexec`. Assumes the root partition is labelled `cr_root` which is | |
# the default on opensuse. Initrd _must_ be uncompressed, this has no logic for | |
# decompressing initrd before concatenation. | |
# Recommended dracut options for building compatible initrd: | |
# enhanced_cpio="yes" | |
# do_strip="no" | |
# tmpdir="/var/tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tsconfig = { | |
include: ["lib/**/*.ts", "lib/packages/**/*.ts", "lib/index.ts"], | |
exclude: ["src"], | |
files: ["lib/index.ts"], | |
typeAcquisition: { | |
enable: true, | |
disableFilenameBasedTypeAcquisition: true, | |
}, | |
compilerOptions: { | |
allowUnreachableCode: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^ | |
\d\d[2468][048]|\d\d[02468][48]|\d\d[13579][26]| # match (y%4 == 0 && y%100 != 0) | |
[02468][048]00|[13579][26]00 # match (y%100 == 0 && y%400 == 0) | |
$/x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <sched.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail; | |
config="${XDG_CONFIG_HOME:-$HOME/.config}/obsidian/obsidian.json" | |
path="$1" | |
# Lookup an already existing vault-id | |
script='.vaults | to_entries[] | select(.value.path == $path) | first(.key)' | |
vaultid="$(<"$config" jq --arg path "$path" "$script" -r)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/execlineb -WP | |
background { | |
getpid -E pid | |
tmux -S .log/tmux-${pid} | |
new-session -s "log" "tail -f -n +1 .log/postgresql/current ; read" ; | |
split-window "tail -f -n +1 .log/graphile-migrate-watch/current ; read" ; | |
select-layout even-horizontal ; | |
bind-key -n C-c kill-session ; | |
bind-key d kill-session ; |