Skip to content

Instantly share code, notes, and snippets.

@SuperCoolFrog
SuperCoolFrog / CapsLockToEsc.REG
Created December 14, 2018 14:18
Maps the caps lock key to escape in windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00, 00,00,00,00
@SuperCoolFrog
SuperCoolFrog / generic-builder.tsx
Created January 28, 2025 02:24
Generic Builder Example - Not Tested
class Builder<T> {
private data: Partial<T> = {};
constructor(initialData?: Partial<T>) {
if (initialData) {
this.data = { ...initialData };
}
}
with<K extends keyof T>(key: K, value: T[K]): Builder<T> {