Skip to content

Instantly share code, notes, and snippets.

@angelsen
angelsen / tam
Created August 14, 2025 14:45
Tmux session management utilities - trun and tam
#!/bin/sh
# tm - Unified tmux session manager
if [ "$1" = "--telp" ]; then
echo "Interactive tmux session manager"
exit 0
fi
# Loop to allow multiple operations
while true; do
@angelsen
angelsen / BFCL-Model-Efficiency-Analyzer.user.js
Created May 13, 2025 09:18
Enhances Berkeley Function Calling Leaderboard with parameter counts and efficiency metrics for identifying the most cost-effective AI models.
// ==UserScript==
// @name BFCL Parameter Analysis
// @namespace http://tampermonkey.net/
// @version 2025-05-13
// @description Extract parameter counts and add efficiency metrics to Berkeley Function Calling Leaderboard
// @author Fredrik Angelsen
// @match https://gorilla.cs.berkeley.edu/leaderboard.html
// @icon https://www.google.com/s2/favicons?sz=64&domain=berkeley.edu
// @grant none
// ==/UserScript==
@angelsen
angelsen / github-setup.md
Created May 8, 2025 09:44
Quick setup guide for fish-ai shell assistant using GitHub's free LLM API - no credit card needed

Quick Setup for fish-ai with Free GitHub API

Step 1: Install fish-ai

# Install fisher (Arch Linux)
sudo pacman -S fisher    # or yay -S fisher

# Install fish-ai
fisher install realiserad/fish-ai
@angelsen
angelsen / screenshot_to_text.sh
Created March 21, 2024 14:37
Screenshot OCR Tool for GNOME (Wayland)
#!/bin/bash
# Screenshot OCR Tool for GNOME (Wayland)
# Dependencies: gnome-screenshot, tesseract-ocr, wl-clipboard
# Usage: Bind this script to a keyboard shortcut to capture part of the screen,
# perform OCR on the selection, and copy the text to the clipboard.
# Define temporary file paths
TMP_IMG="/tmp/screenshot.png"
TMP_TXT_BASE="/tmp/screenshot" # Tesseract will add .txt to this base name