- Every time the REPORT_NETWORK_QUALITY event comes in, I want to assign its results to context (no matter what else happens)
- If the network quality is bad or worse, we want to show a warning
- If the network quality gets better, we want to hide the warning again
- The warning must show for a minimum of 2 seconds, we don't want any weird flickering.
- The user should be able to dismiss the warning forever using the DISMISS_NETWORK_QUALITY_WARNING. The warning should never show again.
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
// Name: Trim latest OBS video | |
import "@johnlindquist/kit"; | |
const { stdout } = await $`ls -t ~/Movies/*.mp4 | head -n 1`; | |
const inputVideo = stdout.trim(); | |
const outputVideo = home("Movies", "trimmed", path.parse(inputVideo).base); |
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
// Name: Trim latest OBS video | |
import "@johnlindquist/kit"; | |
import { z } from "zod"; | |
import { getActiveEditorFilePath } from "./helpers/vscode"; | |
const { stdout } = await $`ls -t ~/Movies/*.mp4 | head -n 1`; | |
const inputVideo = stdout.trim(); |
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
// Name: Trim latest OBS video | |
import "@johnlindquist/kit"; | |
import { z } from "zod"; | |
const { stdout } = await $`ls -t ~/Movies/*.mp4 | head -n 1`; | |
const inputVideo = stdout.trim(); | |
const THRESH = "-40"; |
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
// Name: convert to webp | |
import "@johnlindquist/kit"; | |
import * as path from "path"; | |
const folder = await selectFolder("Select folder to convert from png to webp"); | |
const files = await readdir(folder); | |
const pngFiles = files |
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
// Name: Stop Work | |
// Description: It's the end of the day! Time to chill. | |
import "@johnlindquist/kit"; | |
const appsToClose = [ | |
`Slack`, | |
`Discord`, | |
`QuickTime Player`, | |
`Centered`, |
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
// Name: Delete node modules | |
import "@johnlindquist/kit"; | |
await $`find ~/repos -name 'node_modules' -type d -prune -exec rm -rf '{}' +`; |
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
// Name: convert to webp | |
import "@johnlindquist/kit"; | |
import * as path from "path"; | |
const folder = await selectFolder("Select folder to convert from png to webp"); | |
const files = await readdir(folder); | |
const pngFiles = files |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 { Machine, assign } from 'xstate'; | |
import { FetchOptions } from './fetchMachine.machine.typed'; | |
export type MessageStatus = { status: string }; | |
export type FetchEvent = | |
| { | |
type: 'done.invoke.fetchData'; | |
data: Response; | |
} |
NewerOlder