As of June 2022
brew extract --version=versionNumber caskName homebrew/cask brew install caskName@versionNumber
brew unlink caskName brew link caskName@versionNumber
| /* | |
| React Hook Form <Controller /> integrated Shadcn UI form fields 🙄 | |
| Adapted from: https://ui.shadcn.com/docs/forms/react-hook-form | |
| version: 0.1.0 | |
| gist: https://gist.github.com/didley/28d5454eebb1ad284fef34bc60d58258 | |
| */ | |
| import type { HTMLInputAutoCompleteAttribute } from "react"; | 
| gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swap_lalt_lctl','ctrl:swap_ralt_rctl']"; \ | |
| gsettings set org.gnome.desktop.wm.keybindings close "['<Ctrl>q']" | 
| // version 1.0.0 - https://gist.github.com/didley/36423c48705878b223c0f84ac04544ce | |
| type ExcludedConsoleMethod = "Console" | "clear" | "groupEnd" | "table" | "profile" | "profileEnd" | "timeStamp"; | |
| type InterceptingMethodName = Exclude<keyof Console, ExcludedConsoleMethod>; | |
| type InterceptConsoleOptions<Cb extends (...args: unknown[]) => unknown> = { | |
| method: InterceptingMethodName; | |
| onIntercept: "throw" | ((...args: unknown[]) => void); | |
| cb: Cb; | 
| // version 1.0.0 - https://gist.github.com/didley/accb427bc53e9a0afba1a79134636da5 | |
| /** @example ConstRecord<'a' | 'b'> // {a:'a', b:'b'} */ | |
| type ContRecord<K extends string | number | symbol> = Readonly<{ [P in K]: P }>; | |
| /** | |
| * Used primarily to convert string union to a constant object or array. | |
| * | |
| * @example | |
| * ```ts | 
| // version 1.0.0 - https://gist.github.com/didley/09ad3ddae164f5d7fb02f8ee96971e58 | |
| /** | |
| * Examples | |
| * | |
| * enum NumberEnum { A, B, C } | |
| * | |
| * pickEnum('keys', NumberEnum) // ['A', 'B', 'C'] | |
| * pickEnum('values', NumberEnum) // [0, 1, 2] | |
| * pickEnum('entries', NumberEnum) // [['A', 0], ['B', 1], ['C', 2]] | 
| // version 1.0.0 - https://gist.github.com/didley/54902a3428f854becc89b80587067524 | |
| type Id = string; | |
| type Many = { many: string }; | |
| type One = { one: string }; | |
| type ManyAndOne = Many & One; | |
| type None = object; | |
| type RelationArg = ManyAndOne | Many | One | None; | 
| // this | |
| const user = {name: 'Greg', age: 40} as unknown as User | |
| // becomes | |
| const user = <User><unknown>{name: 'Greg', age: 40} // eslint-disable-line @typescript-eslint/consistent-type-assertions | 
Moved to https://github.com/didley/.dotfiles
https://gif.ski/ (brew install gifski)
https://imageoptim.com/mac (brew install --cask imageoptim)