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.
@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

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
@stevengonsalvez
stevengonsalvez / account_client.go
Created February 21, 2023 16:44 — forked from sebnyberg/account_client.go
Some Azure Go SDK auth things
package azurex
import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/Azure/azure-sdk-for-go/profiles/2020-09-01/resources/mgmt/subscriptions"
@stevengonsalvez
stevengonsalvez / obsidian-web-clipper.js
Last active January 6, 2023 22:52 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */

Using Azure CLI to add cert and hostname to web apps

These notes assume that you already have an app service plan running a number of sites (web apps) that ALL want the same wildcard cert.

The problem being solved was how to point a number of sites to a company domain.

The aliases (e.g. alias trainer.foo-uk.com onto CNAME pvb-live-eun-trainer-as.azurewebsites.net) MUST already be configured in DNS -- Azure will check!

First, how to get the interesting App Service Plan

@stevengonsalvez
stevengonsalvez / jq-cheetsheet.md
Created April 11, 2022 10:07 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@stevengonsalvez
stevengonsalvez / user.py
Created May 9, 2021 07:08 — forked from psa-jforestier/user.py
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@stevengonsalvez
stevengonsalvez / lazy_users.py
Created April 26, 2021 10:02 — forked from morido/lazy_users.py
detect non-contributors in an organization
#!/usr/bin/env python
# you will need http://github3py.readthedocs.org/en/latest/#installation
# I'm not sure if this works on Windows due to the use of strptime()
from github3 import login
import datetime
import json
# Amend the following two lines as necessary