npm -g install js-beautifywhich js-beautifythen take the output and copy itexport JS_POST_PROCESS_FILE=<copied-value from 2>npm -g install prettierwhich prettierthen take the output and copy itexport TS_POST_PROCESS_FILE="<copied-value from 5> --write"npx @openapitools/openapi-generator-cli generate -i openapi.json -g typescript-axios -c ./openapi-generator.yamlnpm addusernpm install -g typescriptnpm publish --access public
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 os | |
| import dotenv | |
| import requests | |
| dotenv.load_dotenv() | |
| TRIEVE_API_KEY = os.getenv("TRIEVE_API_KEY") | |
| TRIEVE_DATASET_ID = os.getenv("TRIEVE_DATASET_ID") | |
| # Start by creating a chunk to represent your item |
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 requests | |
| import time | |
| import os | |
| import json | |
| import random | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| api_key = os.getenv("API_KEY") |
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
| window.location.replace("https://www.philosophizethis.org/transcripts") | |
| const transcriptNodes = document.querySelector(".sqs-block.archive-block.sqs-block-archive").querySelectorAll('a[href^="/transcript/"]'); | |
| const transcriptAnchors = Array.from(transcriptNodes); | |
| const tsNumRegex = /\b(#\w+)|(\b\d+\b)/; | |
| const transcriptObjs = transcriptAnchors.map((transcriptAnchor) => { | |
| const text = transcriptAnchor.innerText; | |
| const tsNums = text.match(tsNumRegex); |
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
| window.location.replace("https://www.philosophizethis.org/podcasts") | |
| const episodeNodes = document.querySelector(".sqs-block.archive-block.sqs-block-archive").querySelectorAll('a[href^="/podcast/"]'); | |
| const episodeAnchors = Array.from(episodeNodes); | |
| const epNumRegex = /#\b(\w+)\b/; | |
| const epObjs = episodeAnchors.map((episodeAnchor) => { | |
| const text = episodeAnchor.innerText; | |
| const epNums = text.match(epNumRegex); |
Stole this list from @swyxio - https://github.com/swyxio/spark-joy/blob/master/README.md#fun-css-frameworks.
lighter, no js. preview some of these with https://sites.yax.com/, https://www.cssbed.com/, https://dohliam.github.io/dropin-minimal-css/ and https://github.com/dbohdan/classless-css
- No CSS Classes - Pure HTML
- https://github.com/alvaromontoro/almond.css has thin fonts
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
| npx @openapitools/openapi-generator-cli generate -i openapi.json -g ruby -c ./openapi-generator.yaml --skip-validate-spec |
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
| const sleepPromise = (ms) => { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve(); | |
| }, ms); | |
| }); | |
| }; | |
| const scrollDown = async () => { | |
| window.scrollTo(0, document.body.scrollHeight); |
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
| pub fn get_sentences(text: &String) -> Vec<String> { | |
| let split_sentence_regex = Regex::new(r"[.!?]+").expect("Invalid regex"); | |
| let sentences: Vec<String> = split_sentence_regex | |
| .split(&text) | |
| .map(|x| x.to_string()) | |
| .collect(); | |
| sentences | |
| } |
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 json | |
| import os | |
| import requests | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| api_key = os.environ.get("API_KEY") | |
| dataset_id = os.environ.get("DATASET_ID") | |
| organization_id = os.environ.get("ORGANIZATION_ID") |