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
#!/bin/zsh | |
# ----------------------------------------------------------------------------- | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
generate_commit_message() { | |
# Get last 3 commit messages | |
last_commits=$(git log -3 --pretty=format:"- %s" 2>/dev/null) | |
git diff --cached | llm " | |
Below is a diff of all staged changes, coming from the command: |
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
respond only in spanish. | |
correct my grammar first before answering questions or responding. | |
if i include bits of english, it's probably because I don't know the word. provide the spanish translation when appropriate. | |
i am using the comprehensible input method of spanish learning,. it is more helpful to me if you provide longer example paragraphs with context, rather than short phrases. |
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
on open dropped_items | |
repeat with imageFile in dropped_items | |
set imagePath to POSIX path of imageFile | |
try | |
set cmd to "PATH=$PATH:~/.local/bin && llm prompt \"You are a helpful image transcriber bot and it is your job to explain exactly what is in images so that blind people and other LLMs can understand the image. first state in plain terms what the pictured image looks like. then exactly transcribe word-for-word all text inside. it is important to transcribe all content so that no detail is omitted. do not include any other text in your reply besides these two things. EXAMPLE: 'a chat app with the message hello world as the first reply'. Now give your description of this image:\" -a " & quoted form of imagePath | |
set altText to do shell script cmd | |
display dialog altText buttons {"Copy", "OK"} default button "Copy" | |
if button returned of result is "Copy" then | |
set the clipboard to altText | |
end if |
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
#!/bin/bash | |
# creates a new worktree. | |
# Usage: git wt [revision] [command] | |
# If no revision is specified, it will use the current HEAD. | |
# you can use `.` as a shortcut for HEAD too. | |
# If no command is specified, it will open the worktree in your IDE: | |
# this is `cursor` for me, but you can change it to your favorite editor. | |
# Function to generate a unique worktree name |
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 { ReadTransaction, Replicache } from "replicache/out/replicache"; | |
class Deferred<T> { | |
promise: Promise<T>; | |
resolve!: (value: T | PromiseLike<T>) => void; | |
reject!: (reason?: any) => void; | |
constructor() { |
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
/** | |
* get all keys from T of type `string` (exclude `number` and `symbol`) | |
*/ | |
export type ObjectKeys<T> = Extract<keyof T, string> | |
export type ObjectValues<T> = T[ObjectKeys<T>] | |
/** | |
* Object.keys(), but assert that an array of T's keys is returned, not `string[]` | |
*/ | |
export const objectKeys = <T>(obj: T) => Object.keys(obj) as ObjectKeys<T>[] |
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
{"lastUpload":"2019-03-19T04:55:34.178Z","extensionVersion":"v3.2.7"} |
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
{"lastUpload":"2019-03-19T04:49:46.656Z","extensionVersion":"v3.2.7"} |
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
{"lastUpload":"2018-09-02T00:01:25.104Z","extensionVersion":"v3.1.1"} |
NewerOlder