Skip to content

Instantly share code, notes, and snippets.

View dreki's full-sized avatar

Sean Gilbertson dreki

  • MN
View GitHub Profile
@dreki
dreki / prompt.json
Created August 9, 2024 00:48 — forked from dan-palmer/prompt.json
Arc Search Browse for Me Prompt
{
"messages": [
{
"content": "You are an advanced, reliable, candid AI system that takes user search queries, converts them into questions, and answers them, using specific facts and details sourced from webpages to prove your answer. You admit when you're unsure or don't know, and you never make a statement without providing a fact or instance to back it up. You answer questions directly and clearly, then provide more detail later. You follow the JSON schema exactly.",
"role": "system"
},
{
"content": "# CONTEXT\nCurrent date: #{DATE_TIME}.\n\nHere are result from a web search for '#{QUERY}':\nBEGIN WEB PAGE #{HOST_1} #{MARKDOWN_1}END WEB PAGE\nBEGIN WEB PAGE #{HOST_2} #{MARKDOWN_2}END WEB PAGE\nBEGIN WEB PAGE #{HOST_3} #{MARKDOWN_3}END WEB PAGE\nBEGIN WEB PAGE #{HOST_4} #{MARKDOWN_4}END WEB PAGE\nBEGIN WEB PAGE #{HOST_5} #{MARKDOWN_5}END WEB PAGE\nBEGIN WEB PAGE #{HOST_6} #{MARKDOWN_6}END WEB PAGE",
"role": "system"
},
@dreki
dreki / git-delete-merged-branches
Created February 14, 2023 19:05
Delete git branches that have been merge to `master` via PR.
#!/usr/bin/env bash
# For all local git branches in the current directory, check if they have a merged PR. If so, offer to delete the branch and the remote. If not, print the PR number and URL.
# Usage: git-delete-merged-branches
# Requires: git, gh, jq
set -e
bold=$(tput bold)
normal=$(tput sgr0)
# Get all local branches
branches=$(git branch --format='%(refname:short)')
# Loop through each branch
@dreki
dreki / amazon-wish-list.js
Last active November 19, 2020 16:42
Log Amazon Wish List contents (as of Nov 2020)
let output = '';
for (const el of wishList.querySelectorAll('[id^="itemName"]')) {
const itemName = el.innerText;
let amazonLink = el.getAttribute('href');
if (amazonLink) { amazonLink = ` (🔗 https://amazon.com${amazonLink})`; }
if (!amazonLink) { amazonLink = ''; }
output = output + `- ${itemName}${amazonLink}\n`;
const comment = el.closest('.a-column').nextSibling.querySelector('[id^="itemComment"]');
if (comment && comment.innerText.trim() !== "") {
output = output + ` 💬 ${comment.innerText}\n`;
@dreki
dreki / mbmbam.md
Last active October 20, 2023 21:45
MBMBaM Memorable Bits

MBMBaM Episodes

  • 424, “That family always had Gushers, and I made them mine because of my actions,”
  • 418, “Gotta get a vasectomy,”
  • 401, sex on the ISS
  • 395, “So sweet, so crisp, so bitter, so many.”
  • 392, “That’s another hour of Monster Hunter I can play before my body has to go to sleep,” “Let’s put the tiger on the table and yell at it,”
  • 390, Justin kicks a bag at Taekwondo 50 times and then throws up
  • 380, "Jesus please us," "That's a wild way of doing that," "We're getting British up in here!," “Got a penis that can cum and everything,”
  • 379, crossing guard, “it is pretty ‘punk rock’,” crane lifts up a car into the sky
  • 378, someone’s brother rips out the pockets of their jeans while they’re talking to them,
@dreki
dreki / index.js
Last active May 6, 2017 02:42
requirebin sketch
/* global document */
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const diff = require('diffhtml');
const container = document.querySelector('.js-container');
document.querySelector('.js-add').addEventListener('click', () => {
/*

Keybase proof

I hereby claim:

  • I am dreki on github.
  • I am seangilbertson (https://keybase.io/seangilbertson) on keybase.
  • I have a public key whose fingerprint is 7C9F 2610 F048 7E96 BF90 0FF3 4683 3068 E26C 3245

To claim this, I am signing this object:

The man was in a cabin on a cruise ship and sleepwalked over the side and into the ocean.
@dreki
dreki / styles.less
Created October 8, 2015 16:54
Horizontally scrolling tabs in Atom
.tab-bar {
overflow-x: auto;
}
.tab-bar .tab {
min-width: 125px; // also prevents from becoming squished
padding-right: 15px;
}
@dreki
dreki / demo-feature-driven.js
Last active August 29, 2015 14:19
Feature-driven
// Feature definitions:
var features = {
'incoming email': [
when('email with link arrives', function() {
doThese([
action('extract article from link'),
action('send article as HTML attachment to Kindle')
]);
@dreki
dreki / rinari-cheat-sheet
Created October 28, 2014 16:08
rinari cheat sheet, for v20141021.827
`rinari-minor-mode' Minor Mode Bindings:
key binding
--- -------
C-c Prefix Command
C-c ' Prefix Command
C-c ; Prefix Command
C-c ' ' rinari-find-by-context