Skip to content

Instantly share code, notes, and snippets.

View bramses's full-sized avatar
🤨

Bram Adams bramses

🤨
View GitHub Profile
@bramses
bramses / CLAUDE.md
Created January 30, 2026 17:33
Claude + Linear Personal Standups

Daily Standup System

This folder is used for daily standups between the user ({name}) and Claude Code.

Run get_time.sh before every request to get the current time and day.

When checking Linear, look at all issues assigned to the user. Check projects and milestones as well.

When adding comments, add (from Claude Code) in the message.

@bramses
bramses / brave-web-search.ts
Last active March 12, 2025 04:58
search web w gpt and brave api https://brave.com/search/api/
import { openai } from "@ai-sdk/openai";
import { streamText } from "ai";
// Allow streaming responses up to 30 seconds
export const maxDuration = 30;
function extractRelevantData(data: any) {
const results: any[] = [];
// Extract from web search results
<audio controls src="your-cfURL-from-server">
<track kind="captions" />
Your browser does not support the
<code>audio</code> element.
</audio>
@bramses
bramses / Code.gs
Last active October 4, 2024 14:02
Search yCb in Google Docs and paste diresctly into editor
function onOpen() {
DocumentApp.getUi().createMenu('yCb')
.addItem('Send Selected Text to API', 'processSelectedText')
.addToUi();
}
function processSelectedText() {
var doc = DocumentApp.getActiveDocument();
var selection = doc.getSelection();
On picture, look for volume number and link to correct part of video timestamp. If not in system, say not in system. All information sourced from Hunterpdiea (https://hunterxhunter.fandom.com/wiki/Hunterpedia)
On help, tell users what you do and prompt them to upload an image of HxH manga cover.
HxH Vol 1-5: https://youtu.be/FrZHYje8mPc?si=4JCdBJXWA1dKgu5c
6-13: https://youtu.be/FrZHYje8mPc?si=mVWEJT8blFPKJZpW&t=80
14-18: https://youtu.be/FrZHYje8mPc?si=R6sr8eLbn70LH8Ol&t=150
19-22: https://youtu.be/FrZHYje8mPc?si=i8XSTzULIPa9OSDs&t=220
23-30: https://youtu.be/FrZHYje8mPc?si=1Wv7jSTmMkQ7WGJD&t=300
31-32: https://youtu.be/FrZHYje8mPc?si=r5iMR-L7-OEoLv72&t=379
@bramses
bramses / _result.md
Last active December 27, 2025 05:32
Use GPT-4 to automatically diagnose errors

TLDR

I wrapped Python traceback and Exception so whenever an Exception is raised, an automatic diagnosis is done by GPT-4. See results below:

Prompt (Automatically Generated by error_wrap function)

This error message occurred because of 'test' at line 177 in file api.py, function main. The exception type is <class 'Exception'>. The function is:

@bramses
bramses / twitch_thanker_guidance.ipynb
Created May 23, 2023 22:20
Using Guidance to create a Twitch thank you bot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bramses
bramses / obsidian-publish-swipe.js
Created January 5, 2023 04:10
swipe left to open menu; swipe right to close it
// swipe left on mobile to open menu
let touchstartX = 0;
let touchendX = 0;
function checkDirection() {
// check if greater than 100px
// if swipe right close menu
if (touchendX < touchstartX && touchstartX - touchendX > 100) {
document
.querySelector(".published-container")
@bramses
bramses / publish.js
Last active January 5, 2023 03:49
testing remark42 on obsidian publish
var remark_config = {
host: "https://demo.remark42.com",
site_id: "remark",
};
// https://stackoverflow.com/a/74271142/3952024
async function waitForElement(selector, timeout = null, location = document.body) {
return new Promise((resolve) => {
let element = document.querySelector(selector);
if (element) {
@bramses
bramses / vercel.json
Created January 2, 2023 19:09
:path not working
{
"rewrites": [
{
"source": "/zettelkasten/",
"destination": "https://publish.obsidian.md/serve?url=bramadams.dev/zettelkasten"
},
{
"source": "/zettelkasten/:path*",
"destination": "https://publish.obsidian.md/serve?url=bramadams.dev/zettelkasten/:path*"
}