Skip to content

Instantly share code, notes, and snippets.

View skeptrunedev's full-sized avatar
💭
🚢 🚢 🚢

skeptrune skeptrunedev

💭
🚢 🚢 🚢
View GitHub Profile
import { sleep } from "bun";
const secure_the_border_act_path = "./secure_the_border_act.txt";
const tax_relief_act_path = "./tax_relief_for_american_families_act.txt";
/// Here are two bills that we want to upload to Trieve
const bills = [
await Bun.file(secure_the_border_act_path).text(),
await Bun.file(tax_relief_act_path).text(),
];
@skeptrunedev
skeptrunedev / yc-directory-scape.js
Last active May 23, 2024 01:43
YC Companies Directory Scraper (paste into console)
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) => {
@skeptrunedev
skeptrunedev / skiff-scroll-script.js
Created January 14, 2024 18:18
skiff scroll for selecting all emails to export
// 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);
@skeptrunedev
skeptrunedev / sentence_email_chunker.py
Last active October 15, 2023 21:06
python chunker for emails and other content that goes line by line
import argparse
import io
import json
import os
import re
import string
import requests
import tiktoken
import pandas as pd
import redis
@aanari
aanari / set-alacritty-default.sh
Last active May 20, 2024 06:54
Set Alacritty as Default Terminal Editor (Ubuntu)
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50
sudo update-alternatives --config x-terminal-emulator