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
// Name: tiktok-images | |
// Description: Resize images to fit TikTok's 9:16 aspect ratio and avoid being covered by the UI | |
// Author: Trevor Atlas | |
// Twitter: @trevoratlas | |
// Threads: trevor.atlas | |
import "@johnlindquist/kit" | |
const sharp = await npm('sharp'); | |
const { getAverageColor } = await npm('fast-average-color-node'); |
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
// Menu: De-Acronym-ify | |
// Description: Replace acronyms with their full names | |
// Author: Trevor Atlas | |
// Twitter: @trevoratlas | |
// Shortcut: cmd ctrl opt shift a | |
// Group: work | |
import '@johnlindquist/kit'; | |
let text = ''; |
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
// Name: humanlike typing | |
// Description: Type the contents of your clipboard as if you were a human | |
// Author: Trevor Atlas | |
// Twitter: @trevoratlas | |
import "@johnlindquist/kit" | |
await hide(); | |
await applescript(String.raw` |
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
// Name: vpn | |
// Schedule: */15 * * * * | |
import "@johnlindquist/kit" | |
applescript(` | |
tell application "System Events" to tell process "GlobalProtect" | |
set connectionStatus to get help of every menu bar item of menu bar 2 | |
if item 1 of connectionStatus = "Not Connected" then | |
click menu bar item 1 of menu bar 2 -- Activates the GlobalProtect "window" in the menubar |
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
// Name: force paste | |
// Description: Paste the contents of your clipboard, even in fields that wouldn't let you paste | |
// Author: Trevor Atlas | |
// Twitter: @trevoratlas | |
// test it out on the email field here: https://codepen.io/andersschmidt/pen/kOOMmw | |
import "@johnlindquist/kit" | |
await hide(); | |
await applescript(`tell application "System Events" to keystroke the clipboard as text`); |
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
// Menu: Icebreaker | |
// Description: Get a random icebreaker question | |
// Author: Trevor Atlas | |
// Twitter: @trevoratlas | |
import '@johnlindquist/kit'; | |
const dbvalues = await db('icebreakers'); | |
const icebreakers: string[] = dbvalues.data; |
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
// Menu: Icebreaker | |
// Description: Get a random icebreaker question | |
// Author: Trevor Atlas | |
// Twitter: @trevor-atlas | |
import '@johnlindquist/kit'; | |
const dbvalues = await db('icebreakers'); | |
const icebreakers: string[] = dbvalues.data; |
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
// Menu: Icebreaker | |
// Description: Get a random icebreaker question | |
// Author: Trevor Atlas | |
// Twitter: @trevor-atlas | |
import '@johnlindquist/kit'; | |
const dbvalues = await db('icebreakers'); | |
const icebreakers: string[] = dbvalues.data; |
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 None = null | undefined; | |
export type Nullable<T> = T | None; | |
/** Make all of T's properties nullable*/ | |
export type NullableOfType<T> = { | |
[P in keyof T]: Nullable<T[P]>; | |
}; | |
/** Correct type for Object.entries(myobj) */ |
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 { useSyncExternalStore } from 'react'; | |
export function createStore<Store>( | |
creator: ( | |
set: (setter: (store: Store) => Store) => void, | |
get: () => Store | |
) => Store | |
) { | |
let store = {} as Store; | |
const get = () => store; |
NewerOlder