Adding an existing project to GitHub using the command line
-
Create a new repository on GitHub. In Terminal, change the current working directory to your local project.
-
Initialize the local directory as a Git repository.
git init
Adding an existing project to GitHub using the command line
Create a new repository on GitHub. In Terminal, change the current working directory to your local project.
Initialize the local directory as a Git repository.
git init
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:
CREATE SCHEMA myproject
In pgAdmin:
To pull the latest changes for LibreChat using Docker, while also considering the caching of images, you can follow these steps:
docker compose down
Using NPM live server to watch HTML files. 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.
npm install -g live-server
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 offers = document.querySelectorAll('div[data-testid="offerTileGridContainer"] mds-icon[type="ico_add_circle"'); if (offers) { var msg = `Found ${offers.length} unclicked offers!`; console.log(msg); offers.forEach(function(offer) { var event = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }); offer.dispatchEvent(event) }); var offerMessage = `Completed clicking ${offers.length} offers!`; alert(offerMessage) } else { alert('No element found with the specified data-testid.') }})()
Index ChatGPT chats to local browser storage (IndexedDB)
// ==UserScript==
// @name ChatGPT Chat Extractor
// @namespace http://tampermonkey.net/
If you accidentally perform a commit with sensitive data, I found this recovery approach to be fairly straightforward.
pip install git-filter-repo
Wouldn't it be nice if Powershell could simulate history | grep "alembic"
? Now it can.
Place this in your Powershell profile (PS> $PROFILE
to find the path)
function Get-CommandHistory {
param (
[string]$Pattern = "*"
)
Often I'll find it helpful to give a LLM context of my file structure for coding projects, so I co-wrote this script to only grab the relevant files and output them in a nicely formatted tree.
It ignores common directories in a VS code (Nuxt and Vue) project and in a Pycharm (Python) project. It also only grabs files with approved extensions.
function Print-Tree {
param (