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'; |
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 dotenv | |
import base64 | |
import requests | |
import mimetypes | |
def to_base64(file): | |
try: |
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 dotenv | |
import base64 | |
import requests | |
import mimetypes | |
def to_base64(file): | |
try: |
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 argparse | |
import io | |
import json | |
import os | |
import re | |
import string | |
import requests | |
import tiktoken | |
import pandas as pd | |
from dotenv import load_dotenv |
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 mut dom = Html::parse_fragment(&document_without_newlines); | |
// remove tables from the HTML | |
let selector = Selector::parse("table").unwrap(); | |
let node_ids: Vec<_> = dom.select(&selector).map(|x| x.id()).collect(); | |
for id in node_ids { | |
dom.remove_from_parent(&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
import os | |
import dotenv | |
import boto3 | |
dotenv.load_dotenv() | |
s3_endpoint = os.getenv("S3_ENDPOINT") | |
access_key = os.getenv("S3_ACCESS_KEY") | |
secret_key = os.getenv("S3_SECRET_KEY") | |
bucket_name = os.getenv("S3_BUCKET") |
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 os | |
import dotenv | |
import boto3 | |
dotenv.load_dotenv() | |
s3_endpoint = os.getenv("S3_ENDPOINT") | |
access_key = os.getenv("S3_ACCESS_KEY") | |
secret_key = os.getenv("S3_SECRET_KEY") | |
bucket_name = os.getenv("S3_BUCKET") |
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
net::ERR_BLOCKED_BY_CLIENT | |
(anonymous) @ companies:18 | |
(anonymous) @ companies:33 | |
// i made this mini script because i am trying to collect the details of the existing public YC companies for a search demo with trieve | |
// with algolia, a search for "cloud storage" doesn't return Dropbox and a search for "bug monitoring" doesn't return PagerDuty, etc. | |
// find and build with trieve at github.com/devflowinc/trieve | |
// to use, navigate to https://www.ycombinator.com/companies and paste the following into the console | |
const sleepPromise = (ms) => { |
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
// paste this into the console when viewing your skiff inbox | |
const elementToScroll = document.querySelector("#mailListElement > div.sc-irmRQO.iHuLQh > div > div:nth-child(1) > div"); | |
setInterval(() => { | |
console.log("paginating"); | |
elementToScroll.scrollTop = elementToScroll.scrollHeight; | |
}, 1000); |
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
// alternative general quotes at https://raw.githubusercontent.com/JamesFT/Database-Quotes-JSON/master/quotes.json | |
// strongly recommend running the following with bun such that you do not have to import node-fetch | |
const quotes = JSON.parse( | |
await ( | |
await fetch( | |
"https://gist.githubusercontent.com/miharekar/d57b58b017c457cd18062a1c36d82e02/raw/76df8f30010456dceafe7d5f39357242410fe403/quotes.json" | |
) | |
).text() |