Skip to content

Instantly share code, notes, and snippets.

View rynomad's full-sized avatar

Ryan Bennett rynomad

View GitHub Profile
@rynomad
rynomad / gist:0dbdc07217d3450252ee3f20ed3ccf54
Created October 7, 2024 00:32
build rettiwt-api for chrome extension
#!/bin/bash
# Create project structure
mkdir -p rettiwt-extension/src/shims
mkdir -p rettiwt-extension/dist
cd rettiwt-extension
# Initialize npm project and install dependencies
npm init -y
npm install webpack webpack-cli babel-loader @babel/core @babel/preset-env \
"""
title: OODA Loop Long-Term Memory
author: Ryan Bennett
date: 2024-07-05
version: 1.0
license: MIT
description: A pipeline for the OODA loop that uses long-term memory to help with decision making.
requirements: neo4j, openai, ollama
environment_variables: NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD, OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL, EMBEDDINGS_MODEL, EMBEDDINGS_DIMENSIONS
"""
@rynomad
rynomad / index.html
Created August 10, 2023 22:16
layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nodes Layout</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
// ==UserScript==
// @name My Userscript
// @namespace http://tampermonkey.net/
// @version 1.0
// @description A ViolentMonkey userscript using BrokerClient
// @match https://chat.openai.com/*
// @grant GM.addStyle
// @grant GM.deleteValue
// @grant GM.getValue
// @grant GM.listValues
@rynomad
rynomad / chptchatdriver.js
Created April 17, 2023 18:08
simple chat driver class for chatGPT. it handles chunking on the way in and out, and returns all the codeElements in the response
class ChatBot {
async start() {
const newChatLink = Array.from(document.querySelectorAll("a")).find(
(anchor) => anchor.innerText === "New Chat"
);
if (newChatLink) {
newChatLink.click();
} else {
console.error('Could not find the "New Chat" link.');
}
@rynomad
rynomad / chatmonkeybundle.user.js
Last active April 18, 2023 20:28
ChatMonkey bundle installer
// ==UserScript==
// @name Open Jasmine Scripts in New Tabs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Open the Jasmine Runner and Jasmine Invoker scripts in new tabs
// @author You
// @match https://gist.github.com/rynomad/2e29748a550a4d82701ddcbf6f909f7b
// @grant GM_openInTab
// ==/UserScript==
@rynomad
rynomad / gptjasmineinvoker.user.js
Last active April 14, 2023 21:06
GPT invoker for jasmine test runner for ChatMonkey
// ==UserScript==
// @name jasmine invoker
// @namespace Violentmonkey Scripts
// @match https://chat.openai.com/*
// @grant GM.openInTab
// @grant GM.communicator
// @grant GM.gpt
// @inject-into content
// ==/UserScript==
@rynomad
rynomad / gptjasminerunner.user.js
Last active April 14, 2023 20:57
Jasmine TestRunner for ChatMonkey
// ==UserScript==
// @name Jasmine Test Runner
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Run Jasmine tests on a page with GM.communicator
// @author You
// @match *://*/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jasmine/3.10.0/jasmine.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jasmine/3.10.0/jasmine-html.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jasmine/3.10.0/boot.min.js
@rynomad
rynomad / rules.user.js
Last active April 12, 2023 20:36
add auto-insert rules to chatGPT
// ==UserScript==
// @name ChatGPT rulesTextArea
// @namespace Violentmonkey Scripts
// @match https://chat.openai.com/*
// @grant none
// @version 1.1
// @author -
// @description 4/12/2023, 2:22:19 PM
// ==/UserScript==
@rynomad
rynomad / gptcodemerge.user.js
Last active April 12, 2023 20:35
drag and drop code blocks to merge them
// ==UserScript==
// @name Draggable & Droppable Code Elements
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Make code elements draggable, droppable, and merge their contents when dropped onto each other.
// @author You
// @match https://*/*
// @grant GM.addStyle
// ==/UserScript==