ποΈββοΈ
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: er-prepare-module-titles-and-code | |
import "@johnlindquist/kit" | |
import { readdir, readFile, stat } from "node:fs/promises"; | |
let dir | |
// dir = "/Users/zacjones/Documents/01.Projects/Epic-React-v2/repos/react-fundamentals/exercises" | |
if (!dir) dir = await getSelectedDir() | |
if (!dir) dir = await drop("Select a Epic React v2 exercise directory") |
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: er-prepare-module-titles-and-code | |
import "@johnlindquist/kit" | |
import { readdir, readFile, stat } from "node:fs/promises"; | |
let dir | |
// dir = "/Users/zacjones/Documents/01.Projects/Epic-React-v2/repos/react-fundamentals/exercises" | |
if (!dir) dir = await getSelectedDir() | |
if (!dir) dir = await drop("Select a Epic React v2 exercise directory") |
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
// Author: Zac Jones | |
// Keyword: sw | |
import "@johnlindquist/kit" | |
import { titleCase, sentenceCase, paramCase, camelCase } from "text-case" | |
let options = { | |
"[t]itle": titleCase, | |
"[s]entence": sentenceCase, |
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: rails set lesson tag | |
// Author: Zac Jones | |
// Keyword: rt | |
import "@johnlindquist/kit" | |
const tagName = await arg("Enter tag name: ") | |
const token = await env("EGGHEAD_AUTH_TOKEN") | |
let lessonUrl = await getActiveTab() |
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: egghead Admin Login As User | |
// Author: Ian Jones | |
// Cache: true | |
// Keyword: admin | |
import _ from "lodash" | |
let eggheadUserToken = await env("EGGHEAD_AUTH_TOKEN"); | |
const eggheadAuthHeaders = { | |
Authorization: `Bearer ${eggheadUserToken}`, |
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: Get egghead data | |
// Keyword: egh | |
// Author: Zac Jones | |
// Twitter: @zacjones93 | |
let { paramCase } = await npm("change-case"); | |
// let console.log = (str) => chalk.green`${str}` | |
// let console.warn = (str) => chalk.red`${str}` |
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 "@johnlindquist/kit" | |
const sanityClient = await npm("@sanity/client"); | |
let { nanoid } = await npm("nanoid"); | |
let eggheadUserToken = await env("EGGHEAD_AUTH_TOKEN"); | |
let key = await env("SANITY_READ_WRITE_KEY"); | |
const eggheadSanityClient = sanityClient({ | |
projectId: "sb1i5dlc", | |
dataset: "production", |
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: Get egghead data | |
// Keyword: egh | |
// Author: Zac Jones | |
// Twitter: @zacjones93 | |
let { paramCase } = await npm("change-case"); | |
// let console.log = (str) => chalk.green`${str}` | |
// let console.warn = (str) => chalk.red`${str}` |
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: Get egghead data | |
// Keyword: egh | |
let { paramCase } = await npm("change-case"); | |
// let console.log = (str) => chalk.green`${str}` | |
// let console.warn = (str) => chalk.red`${str}` | |
// https://egghead.io/playlists/ | |
// let eggAxios = axios.create({ | |
// baseURL: 'https://egghead.io', |
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
/* | |
# Chat with ChatGPT | |
## <span class="text-primary">π Note: LangChain is still in development. This script will keep updating to use the latest APIs</span> | |
Use `Kit` -> `Manage npm Packages` -> `Update a Package` -> `langchain` to update to install the latest version. | |
- Opens the `chat` component | |
- Type a message and press `enter` to send | |
- The message is sent to the OpenAI API |
NewerOlder