This file contains hidden or 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
export type Either<R, L> = Left<L, R> | Right<R, L> | |
export class Left<L, R = never> { | |
readonly _tag = "Left" | |
constructor(public readonly left: L) {} | |
*[Symbol.iterator](): Generator<Either<R, L>, R, any> { | |
return yield this | |
} | |
} |
This file contains hidden or 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
vim.opt.termguicolors = false | |
vim.env.TERM = "xterm-256color" | |
vim.cmd("colorscheme default") | |
vim.cmd("highlight Normal ctermbg=NONE guibg=NONE") | |
vim.cmd("highlight NonText ctermbg=NONE guibg=NONE") | |
vim.cmd("highlight SignColumn ctermbg=NONE guibg=NONE") | |
vim.cmd("highlight VertSplit ctermbg=NONE guibg=NONE") |
This file contains hidden or 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
export type merge<O> = { [K in keyof O]: O[K] } & {}; | |
type Type = "number" | "string"; | |
type concatStrings<arr extends any[], acc extends string = ""> = arr extends [] | |
? acc | |
: arr extends [infer x extends string] | |
? concatStrings<[], `${acc}${x}`> | |
: arr extends [infer x extends string, ...infer xs extends string[]] | |
? concatStrings<xs, `${acc}${x}`> |
This file contains hidden or 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
// |
This file contains hidden or 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 frame = Screen.main().visibleFrame(); | |
const toggleStreaming = Key.on("s", ["control", "option"], () => { | |
const isStreaming = Storage.get("isStreaming") ?? false; | |
Storage.set("isStreaming", !isStreaming); | |
if (isStreaming) { | |
getAndMoveApp( | |
"Chatterino", | |
{ x: 0, y: 0 }, | |
{ width: 250, height: frame.height }, |
This file contains hidden or 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
import { FileSystem } from '@effect/platform'; | |
import { NodeFileSystem, NodeRuntime } from '@effect/platform-node'; | |
import * as Codegen from '@sinclair/typebox-codegen'; | |
import { Console, Context, Effect, Layer, Ref, Stream, pipe } from 'effect'; | |
import { compose } from 'effect/Function'; | |
import { kebabToSnake, snakeToPascal } from 'effect/String'; | |
import type { InternalRoute } from 'elysia'; | |
import * as fs from 'node:fs/promises'; | |
import ts from 'typescript'; | |
import { elysiaRouter } from '~/elysia.router'; |
This file contains hidden or 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
alt - h : yabai -m window --focus west | |
alt - j : yabai -m window --focus south | |
alt - k : yabai -m window --focus north | |
alt - l : yabai -m window --focus east | |
alt + shift - h : yabai -m window --swap west || $(yabai -m window --display west; yabai -m display --focus west) | |
alt + shift - j : yabai -m window --swap south || $(yabai -m window --display south; yabai -m display --focus south) | |
alt + shift - k : yabai -m window --swap north || $(yabai -m window --display north; yabai -m display --focus north) | |
alt + shift - l : yabai -m window --swap east || $(yabai -m window --display east; yabai -m display --focus east) |
This file contains hidden or 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
drop function if exists create_workflow( | |
name text, created_by varchar(24), workflow_type workflow_type, milestone_name text | |
); | |
create function create_workflow(name text, created_by varchar(24), workflow_type workflow_type, milestone_name text) | |
returns uuid | |
language plpgsql | |
as | |
$$ |
This file contains hidden or 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
local utils = require("utils") | |
return { | |
{ | |
"nvim-treesitter/nvim-treesitter", | |
init = function() | |
utils.lazy_load("nvim-treesitter") | |
end, | |
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, | |
build = ":TSUpdate", |
This file contains hidden or 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 ControlledField< | |
TFieldValues extends FieldValues = FieldValues, | |
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, | |
> = { | |
control: Control<TFieldValues>; | |
name: TName; | |
label?: string; | |
description?: string; | |
render: (props: { | |
field: ControllerRenderProps<TFieldValues, TName>; |