npm -g install js-beautify
which js-beautify
then take the output and copy itexport JS_POST_PROCESS_FILE=<copied-value from 2>
npm -g install prettier
which prettier
then 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.yaml
npm adduser
npm install -g typescript
npm publish --access public
This file contains 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 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 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 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 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 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 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") |
This file contains 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
let pluginsArray = []; | |
const pluginContainers = document.querySelectorAll('.p-5.flex.flex-col.rounded-lg.bg-secondary.transition-all.hover\\:shadow-2xl.hover\\:bg-gray-800'); | |
pluginContainers.forEach((container) => { | |
const title = container.querySelector('.text-lg.mb-1.font-semibold.leading-tight')?.innerText.trim() || 'No title'; | |
const authorNameElement = container.querySelectorAll('.text-muted.text-sm')[0]; | |
const author_name = authorNameElement ? authorNameElement.innerText.trim() : 'Unknown Author'; |
NewerOlder