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
export function parseEnv(env: '1' | '0' | 'true' | 'false' | string | undefined): string | boolean { | |
if (!env) { | |
return false; | |
} | |
try { | |
return Boolean(JSON.parse(env)); | |
} catch { | |
return env; | |
} | |
} |
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
#!/urs/bin/env zsh | |
export EDITOR=nvim | |
export XDG_RUNTIME_DIR=/run/user/$(id -u) | |
# WSL | |
export BROWSER='pwsh.exe /c start' | |
alias chrome='/mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe' | |
alias wezterm=wezterm.exe | |
alias wezterm-mux-server=wezterm-mux-server.exe |
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
repeat 100 pnpm test -- --ci --silent <test file> &>/dev/null && echo -n "." || echo -n 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
// @ts-check | |
import typescript from 'typescript-eslint' | |
import reactPlugin from 'eslint-plugin-react' | |
import reactHooksPlugin from 'eslint-plugin-react-hooks' | |
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y' | |
import importPlugin from 'eslint-plugin-import' | |
import unusedImportsPlugin from 'eslint-plugin-unused-imports' | |
import js from '@eslint/js' | |
import globals from 'globals' |
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
import { BehaviorSubject } from 'rxjs' | |
import { useSyncExternalStore } from 'react' | |
export function useSyncBehaviorSubject<T>(subject: BehaviorSubject<T>): T { | |
return useSyncExternalStore( | |
(onStoreChange) => { | |
const subscription = subject.subscribe(onStoreChange) | |
return () => subscription.unsubscribe() | |
}, | |
() => subject.value |
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
import { ReactNode } from "react"; | |
import { Flex } from "@radix-ui/themes"; | |
export function Center({ children }: { children: ReactNode }) { | |
return ( | |
<Flex justify="center" direction="column" align="center" height="100%" width="100%" gap="4"> | |
{children} | |
</Flex> | |
); | |
} |
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
{ | |
"singleQuote": true, | |
"semi": false, | |
"printWidth": 160 | |
} |
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
import typescriptParser from "@typescript-eslint/parser" | |
import typescriptPlugin from "@typescript-eslint/eslint-plugin" | |
import vueParser from 'vue-eslint-parser' | |
import vuePlugin from 'eslint-plugin-vue' | |
export default [ | |
{ | |
files: ["src/**/*.{ts,vue}"], | |
languageOptions: { | |
parser: vueParser, |
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
local wezterm = require 'wezterm'; | |
local act = wezterm.action | |
local THEME_ACCENT = '#6d9df1' | |
local THEME_GRAY_3 = '#262626' | |
local THEME_GRAY_2 = '#3a3a3a' | |
local THEME_GRAY_1 = '#626262' | |
local SOLID_RIGHT_ARROW = utf8.char(0xe0b0) | |
local SOLID_LEFT_ARROW = utf8.char(0xe0b2) |
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
import typescriptParser from "@typescript-eslint/parser" | |
import typescriptPlugin from "@typescript-eslint/eslint-plugin" | |
import reactPlugin from 'eslint-plugin-react' | |
import reactHooksPlugin from 'eslint-plugin-react-hooks' | |
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y' | |
export default [ | |
{ | |
files: ["src/**/*.ts{,x}"], | |
languageOptions: { |
NewerOlder