Skip to content

Instantly share code, notes, and snippets.

View PEZ's full-sized avatar
🎯
Focusing

Peter Strömberg PEZ

🎯
Focusing
View GitHub Profile
{:epupp/script-name "pez/selector_inspector.cljs"
:epupp/description "Prints elements and their selector to the console. Run to start. Run again to Stop."}
(ns selector-inspector
(:require [clojure.string :as string]))
;; Build a selector path for an element
(defn element->selector [elem]
(loop [el elem
path []]
(js/console.log "External code from gist evaluated!")
{:epupp/script-name "pez/document_start_test.cljs"
:epupp/site-match ["https://gist.github.com/*" "https://github.com/*"]
:epupp/description "Testing document-start run-at things."
:epupp/run-at "document-start"}
(ns my-userscript)
;; This code runs before page scripts execute
(js/console.log "BOOM! Intercepting page initialization!")
{:epupp/script-name "pez/gh_party_mode.cljs"
:epupp/description "I'm sorry. Copilot went crazy with things."
:epupp/site-match "https://github.com/PEZ/*"}
(ns tampers.github)
(defonce !db (atom {:db/foo "bar"}))
(comment
@PEZ
PEZ / prompt_sync.cljs
Created September 10, 2025 14:00
Joyride script for syncing Copilot instructions between Stable and Insiders
(ns prompt-sync
(:require ["vscode" :as vscode]
["path" :as path]
[promesa.core :as p]
[joyride.core :as joyride]))
(def ^:const VSCODE-FILE-TYPE vscode/FileType.File)
(def ^:dynamic *log-level* :debug)
@PEZ
PEZ / boost-pronpt.prompt.md
Last active August 12, 2025 12:11
A prompt file for VS Code Copilot to help with crafting good task prompts from one liners
mode
agent

You are an AI assistant designed to help users create high-quality, detailed task prompts. DO NOT WRITE ANY CODE.

Your goal is to iteratively refine the user’s prompt by:

At all times when you need clarification on details, ask specific questions to the user using the joyride_request_human_input tool.

  • Understanding the task scope and objectives
@PEZ
PEZ / instructions-refinement.prompt.md
Created July 8, 2025 15:25
Prompt for Copilot (or any LLM) to help with refining LLM instructions/system prompts
mode
agent

You are an expert AI instruction engineer specializing in optimizing prompts for maximum effectiveness using positional bias principles.

CRITICAL CONSTRAINTS

  • Always restructure instructions to leverage primacy effect - most important content must come first
  • Eliminate redundancy and verbose explanations - every word counts in the high-attention zones
@PEZ
PEZ / keybindings.json
Last active December 17, 2025 15:08
Calva custom repl commands and keybinding for Snitch
...
// --- SNITCH CONVENIENCE, Thanks, Abhinav! ♥️🙏
// https://github.com/AbhinavOmprakash/snitch
{
// Instrument as snitched defn*
"key": "cmd+enter",
"when": "editorLangId == 'clojure' && calva:connected",
"command": "calva.runCustomREPLCommand",
"args": {
"snippet": "${top-level-form|replace|^\\(defn-?|(defn*}"
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 20 columns, instead of 11 in line 4.
benchmark,timestamp,commit-sha,is-checked,user,model,ram,os,arch,gcc,g++,llvm,clang,language,run-ms,mean-ms,std-dev-ms,min-ms,max-ms,runs
loops,2025-02-06T22:36:31Z,08471f6,true,PEZ,Apple M1 Max,32GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,,Apple clang version 16.0.0 (clang-1600.0.26.6),Babashka,10000,7414.845771,34.810146,7380.035625,7449.655917,2
loops,2025-02-06T22:36:31Z,08471f6,true,PEZ,Apple M1 Max,32GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,,Apple clang version 16.0.0 (clang-1600.0.26.6),C,10000,62.525219,1.846617,62.097000,85.542000,160
loops,2025-02-06T22:36:31Z,08471f6,true,PEZ,Apple M1 Max,32GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,,Apple clang version 16.0.0 (clang-1600.0.26.6),Clojure,10000,63.30155329746835,0.2950020737574292,63.00025,65.484208,158
loops,2025-02-06T22:36:31Z,08471f6,true,PEZ,Apple M1 Max,32GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 20 columns, instead of 10 in line 4.
benchmark,timestamp,commit-sha,is-checked,user,model,ram,os,arch,gcc,g++,llvm,clang,language,run-ms,mean-ms,std-dev-ms,min-ms,max-ms,runs
loops,2025-02-05T21:48:28Z,38b719f,true,PEZ,Apple M4 Max,64GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,19.1.6,Homebrew clang version 19.1.6,Crystal,10000,49.30541871921182,0.9362449735720588,47,54,203
loops,2025-02-05T21:48:28Z,38b719f,true,PEZ,Apple M4 Max,64GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,19.1.6,Homebrew clang version 19.1.6,Ruby,10000,2918.7309999833815,20.273635754519336,2903.303999919444,2948.1689999811356,4
loops,2025-02-05T21:48:28Z,38b719f,true,PEZ,Apple M4 Max,64GB,darwin24,arm64,gcc (Homebrew GCC 14.2.0_1) 14.2.0,g++ (Homebrew GCC 14.2.0_1) 14.2.0,19.1.6,Homebrew clang version 19.1.6,Ruby YJIT,10000,988.1454545538872,14.971385805672192,976.9550000783056,1030.6579999160022,11
fibonacci,2025-02-05T21:48:28Z,38b719f,true,PEZ,Apple M4 Max,64GB,darwin24,arm64,gcc (Homebr