Skip to content

Instantly share code, notes, and snippets.

View Amber-Williams's full-sized avatar

Amber Williams Amber-Williams

View GitHub Profile
@Amber-Williams
Amber-Williams / ai-generate-meal.sh
Created August 8, 2023 12:19
Generates meals using OpenAI's GPT with mermaid chart breakdown of calories
# Requires:
# 1. `code` shortcut to open VSCode - see https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line
# 2. VSCode extension to visualize Mermaid code in markdown files - Extension ID bierner.markdown-mermaid
# 3. Installing Charmbracelet's Mods CLI - see https://github.com/charmbracelet/mods
export MODS_SOURCE_RECIPES=$(curl -s "https://gist.githubusercontent.com/Amber-Williams/fb3e5e10c83e6a44000826c0339c3ee2/raw/83f681c241defafd36fad90ace71ae1410548cd4/healthy-vegan-recipes.md")
echo $MODS_SOURCE_RECIPES | mods -f "Using this data for templating only - create 5 new healthy vegan recipes that are NOT in the data set. The response should be in the format of the provided data using markdown and mermaid code blocks" > ~/new-recipes.md && code ~/new-recipes.md
pie
title Lentil-spinach salad
"protein" : 12
"carbs" : 20
"fat" : 3

Ingredients: Lentils, spinach, lemon, olive oil, salt. (200-250 calories)

/**
* @author Amber Williams https://github.com/Amber-Williams
*
* @summary
* This is a script to generate text-to-speech for each ChatGPT response on Firefox
*
*/
let observer = new MutationObserver(function (mutations_list) {
mutations_list.forEach(function (mutation) {