Skip to content

Instantly share code, notes, and snippets.

@mberman84
mberman84 / gist:ea207e7d9e5f8c5f6a3252883ef16df3
Created November 29, 2023 15:31
AutoGen + Ollama Instructions
1. # create new .py file with code found below
2. # install ollama
3. # install model you want “ollama run mistral”
4. conda create -n autogen python=3.11
5. conda activate autogen
6. which python
7. python -m pip install pyautogen
7. ollama run mistral
8. ollama run codellama
9. # open new terminal
@Quorafind
Quorafind / AskChatGPT-With-Surfing.js
Created February 19, 2023 11:20
Using Quickadd to ask current selection In ChatGPT
// Version 0.0.1
module.exports = askChatWithPrompt;
function askChat(str, app) {
const prompt = encodeURI(str);
const chatViewEl = app.workspace.getLeavesOfType("surfing-view").find((item)=>{ return /chat\.openai\.com/.test(item?.view?.currentUrl)}).view.webviewEl;
chatViewEl.executeJavaScript(`
var htmlElement = document.querySelector("textarea");
htmlElement.value = decodeURI("${ prompt }");
@Quorafind
Quorafind / Dynamic Highlight.data.md
Last active May 13, 2024 02:50
Using dynamic highlight to highlight HH:mm/H:mm time format in Obsidian

Import data json below to dynamic highlight config.

{
  "light-time-8-5": {
    "class": "light-time-8-5",
    "color": "#E45858",
    "regex": true,
    "query": "(?<=\\s)(0?8|20):[3-5][0-9](:[0-5][0-9])?(?=(\\s|$))",
    "mark": [