-
Edit a file in
/usr/local/bin
calledpft
-
Mark it executable:
sudo chmod +x /usr/local/bin
-
Add these contents
#!/bin/bash
To download and use Llama models in LibreChat on your Mac, potentially via Ollama, follow these steps:
First, follow the official LibreChat instructions to update your librechat.yaml
file in the base directory.
(unclear if needed) Set the environment variable launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
to expose the ollama API before ollama serve
, per this github issue
Set the volume
to your docker-compose.override.yml
for Librechat (under the service named api
):
services:
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
Paypal 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!
Offers found at https://www.paypal.com/offers/
Here's a guide on bookmarklets if you're not familiar with how they work.
Here's the code.
VS code will ask you the first time but if you make the wrong choice or want to change it, here's how you change it:
To test, on a file use Alt-Shift-F to format.
Note for Vue: Use "Vue Official", it works better than Prettier.
In some cases I'd like the marked library open links in new tabs, but the default behavior is to open in the same tab. This means you have to override then renderer but the documentation doesn't make it completely obvious how to do that. Here's how you can do it.
// src/utils/markdown.ts
import { marked } from "marked";
import type { Token, Tokens } from "marked";
export const renderMarkdown = (content: string) => {
try {
const renderer = new marked.Renderer();
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 (
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 = "*"
)
If you accidentally perform a commit with sensitive data, I found this recovery approach to be fairly straightforward.
pip install git-filter-repo