Skip to content

Instantly share code, notes, and snippets.

View stevengonsalvez's full-sized avatar
💭
trying to be monkish

Steven Gonsalvez stevengonsalvez

💭
trying to be monkish
View GitHub Profile
@stevengonsalvez
stevengonsalvez / prompt-rewriter.popclipext
Created June 1, 2025 12:50 — forked from deepaks7n/prompt-rewriter.popclipext
A Popclip extension to rewrite badly written LLM prompts as per Claude 4 best practices
#popclip
name: Prompt Rewriter
identifier: com.custom.promptrewriter
icon: symbol:sparkles
options:
- identifier: api_key
type: string
label: Anthropic API Key
description: Your Anthropic Claude API Key
- identifier: model
@stevengonsalvez
stevengonsalvez / cursor-agent-system-prompt.txt
Created March 17, 2025 21:30 — forked from sshh12/cursor-agent-system-prompt.txt
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
@stevengonsalvez
stevengonsalvez / claude-autoclicker.sh
Created December 23, 2024 14:36 — forked from supersational/claude-autoclicker.sh
Claude Autoclick "Allow Tool"
while true; do
osascript -e '
tell application "System Events"
if exists process "Claude" then
tell process "Claude"
if exists button "Allow for This Chat" of group 2 of group 1 of group 2 of group 1 of UI element "Claude" of group 1 of group 1 of group 1 of group 1 of window "Claude" then
click button "Allow for This Chat" of group 2 of group 1 of group 2 of group 1 of UI element "Claude" of group 1 of group 1 of group 1 of group 1 of window "Claude"
log "clicked allow button"
end if
end tell
@stevengonsalvez
stevengonsalvez / ecommerce_analysis_notebook.ipynb
Last active March 17, 2024 12:04
customer_browser_analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stevengonsalvez
stevengonsalvez / Text Retrieval Agent with Conversational Agent Executor.md
Created February 20, 2024 10:59
The code snippet creates a retrieval chain for text-based knowledge using a combination of language models and vector stores. It then creates an agent with conversational capabilities and executes a question using the agent and retrieval chain to obtain an answer.

Text Retrieval Agent with Conversational Agent Executor

Preview:
from langchain import SQLDatabase, SQLDatabaseChain
from langchain.prompts.prompt import PromptTemplate
from langchain.chat_models import ChatOpenAI
from langchain.memory import ConversationBufferWindowMemory
from langchain.chains import ConversationChain, LLMChain
from langchain.embeddings import OpenAIEmbeddings
from langchain.chains import RetrievalQAWithSourcesChain, RetrievalQA
@stevengonsalvez
stevengonsalvez / Text Retrieval Chain with Vectorstore and RetrievalQA.md
Created February 20, 2024 10:44
The code snippet defines a function that creates a retrieval chain for text retrieval. It initializes a RetrievalChain object with a language model and a retriever, and then returns the RetrievalChain object. The retriever is created using a vectorstore and

Text Retrieval Chain with Vectorstore and RetrievalQA

Preview:
def text_retrieval_chain():
    # main retrieval chain class
    class RetrievalChain:
        def __init__(self, llm, retriever):
            self.chain = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=retriever)

        def run(self, prompt):

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
// Example based actions/core documentation
const core = require('@actions/core');
const { decode } = require('jsonwebtoken');
const { axiosClient } = require('./axioshelp');
getIDTokenAction().catch((error) =>{
console.log('errors?',error)
})
async function getIDTokenAction() {
// Sketchy loading of the jsrsasign library into Postman Sandbox
var navigator = {}; //fake a navigator object for the lib
var window = {}; //fake a window object for the lib
eval(pm.globals.get("jsrsasign-js")); //import javascript jsrsasign
var currentTime = +new Date(); // the current time in milliseconds
var issuedAtTimeSeconds = currentTime/1000;
var expirationTimeSeconds = currentTime/1000 + 3600;
// Grab the JWK from the Environment and change to JSON object