Skip to content

Instantly share code, notes, and snippets.

Tampermonkey script
// ==UserScript==
// @name         ChatGPT Chat Extractor
// @namespace    http://tampermonkey.net/
// @version      1.4
// @description  Extract ChatGPT chats to IndexedDB
@davehague
davehague / Chase-Partner-Offers-Bookmarklet.md
Last active May 25, 2024 16:15
Click all Chase Partner Offers Bookmarklet

Chase credit cards offer partner rebates, but you have to go in an manually click them. Use this script when you're on the offer page to click all of them, and then if you happen to purchase the item in the partner reward, you'll be alerted of a rebate via email!

Here's a guide on bookmarklets if you're not familiar with how they work.

Here's the code.

javascript:(function(){
    var container = document.querySelector('div[data-testid="offerTileGridContainer"]');
	
@davehague
davehague / html-live-reload.md
Created May 23, 2024 08:53
Local Development - Live Reload for HTML/JS/CSS

To avoid CORS issues and to work more quickly when developing a static HTML site locally, use a local server like live-server for development.

  1. Install live-server
npm install -g live-server
  1. Serve the project. Navigate to the root directory of your project and start live-server:
@davehague
davehague / Update Librechat.md
Last active April 24, 2024 09:29
Update Librechat

To pull the latest changes for LibreChat using Docker, while also considering the caching of images, you can follow these steps:

  1. Stop the running LibreChat container(s):
docker compose down
  1. CD to your librechat repository:
@davehague
davehague / Export Supabase Table Schemas.md
Created April 17, 2024 19:01
Export Supabase Table Schemas

Setup

  1. Download and install pgAdmin
  2. Get your Supabase connection settings from the database settings page.

Export

In pgAdmin:

  1. Right click the schema and choose 'CREATE script' to script the schema
  2. Right click the schema and choose 'BACKUP...' to script the tables
@davehague
davehague / Supabase Multi-Project Project.md
Created April 17, 2024 15:39
Supabase Multi-Project Project

Supabase only allows two projects to be active at any given time on their free tier. However, if you're like me and you like to explore and create a lot of projects, you'll be frustated with having to spin them down and up.

To solve this, use Postgres schemas. A PostgreSQL schema is a namespace that groups together database objects such as tables, views, indexes, data types, functions, and operators. It allows you to organize your data and objects within a database in a way that makes sense for your application.

Supabase actually has a page on how to use schemas. The short of it is below:

  1. Create a new schema
CREATE SCHEMA myproject
@davehague
davehague / Add_Existing_Project_To_Git.md
Last active June 17, 2022 11:08 — forked from alexpchin/Add_Existing_Project_To_Git.md
Add Existing Project To Git Repo

Adding an existing project to GitHub using the command line

  1. Create a new repository on GitHub. In Terminal, change the current working directory to your local project.

  2. Initialize the local directory as a Git repository.

    git init