Skip to content

Instantly share code, notes, and snippets.

@rmtbb
rmtbb / iMessageAttachmentsLinksExtractor.sh
Created November 3, 2024 23:16
iMessage Attachments and Links Extractor for macOS
#!/bin/bash
# Define the main export folder
export_folder=~/Desktop/iMessages_Export
mkdir -p "$export_folder"
# Part 1: Generate the CSV file
echo "Generating CSV file..."
sqlite3 ~/Library/Messages/chat.db <<EOF
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active August 2, 2026 10:23
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard
@rmtbb
rmtbb / gist:741fe56b812e8074d86b7de0562f82c8
Created October 7, 2024 03:49
Coupa Roles And Permissions Combiner Script.py
"""
This script processes multiple CSV files containing roles and permissions data, each residing in a 'data' subfolder relative to the script's location. Each CSV file is expected to have columns labeled 'Controller', 'Action', 'Permission ID', 'Description', and 'Enabled'. The script performs the following tasks:
1. Reads each CSV file from the 'data' subfolder.
2. Renames the 'Enabled' column of each file to reflect the name of the source file, with underscores and hyphens converted to spaces, to maintain uniqueness across different files.
3. Aligns all DataFrames on the 'Controller', 'Action', 'Permission ID', and 'Description' columns, assuming these columns are consistent across files.
4. Merges all processed DataFrames horizontally, creating a master DataFrame where each 'Enabled' column is distinctly named according to its original CSV file.
5. Saves the resulting master DataFrame to an Excel file named 'Master_Permissions_File.xlsx' in the script's running directory.
Usage:
@rmtbb
rmtbb / mac-decom-prep.sh
Last active April 14, 2026 20:00
macOS decommission prep — tears down Tailscale + openclaw before Erase All Content and Settings
#!/usr/bin/env bash
# ------------------------------------------------------------------
# mac-decom-prep — tears down Tailscale + openclaw so a Mac can be
# factory-reset cleanly. Assumes iCloud is NOT signed in (otherwise
# sign out first to avoid Activation Lock).
#
# ONE-SHOT USAGE (copy/paste into a zsh terminal):
# curl -fsSL https://gist.githubusercontent.com/rmtbb/4dcaf60b8735b3cb16665bfd9bc8b7b7/raw/mac-decom-prep.sh | sudo bash
#
# Short URL for this gist: https://tinyurl.com/macwipe-openclaw
@rmtbb
rmtbb / stayup.sh
Created February 1, 2025 19:47
stayup: a fun one-liner tool that does more than just keep your Mac awake using `caffeinate -d -u`. It adds a bit of personality by displaying two synchronized, animated ASCII eyes
caffeinate -d -u & pid=$!; trap "kill $pid" EXIT; blink=$(( $(date +%s) + 10 + RANDOM % 21 )); nextdir=$(date +%s); px=$((RANDOM % 3)); py=$((RANDOM % 3)); while sleep 0.5; do now=$(date +%s); if [ $now -ge $nextdir ]; then px=$((RANDOM % 3)); py=$((RANDOM % 3)); nextdir=$((now + 2 + RANDOM % 3)); fi; if [ $now -ge $blink ]; then clear; echo -e " +-------+ +-------+"; echo -e " |-------| |-------|"; echo -e " |-------| |-------|"; echo -e " |-------| |-------|"; echo -e " +-------+ +-------+"; echo -e "\nStay up till you wake up\nPress Control + C to exit"; sleep 0.2; blink=$(( $(date +%s) + 10 + RANDOM % 21 )); fi; clear; echo -e " +-------+ +-------+"; for r in 0 1 2; do row=""; for c in 0 1 2; do if [ $r -eq $py ] && [ $c -eq $px ]; then row="${row}\033[107m\033[30m@\033[0m"; else row="${row}\033[107m \033[0m"; fi; done; echo -e " | ${row} | | ${row} |"; done; echo -e " +-------+ +-------+"; echo -e "\nStay up till you wake up\nPress Control + C to exit"; done
@rmtbb
rmtbb / map-nas.bat
Created March 4, 2026 21:55
Persistent Non Intrusive NAS SMB Drive Mapping Script
@echo off
set "DRIVE=Z:"
set "SHARE=\\10.10.10.10\media"
set "USER=USER"
set "PASS=PASSWORD"
rem If Z: exists (mapped or local), do not touch it
if exist %DRIVE%\ (
exit /b 0
)
@rmtbb
rmtbb / GUIDE_Building_MiroMind.md
Created January 12, 2026 22:02
Building MiroMind: A Local Research Agent with MiroThinker 1.5

Building MiroMind: A Local Research Agent with MiroThinker 1.5

A complete guide to building a research agent that uses MiroThinker 1.5 (running locally via LM Studio) with SearXNG for web search capabilities.

What We're Building

MiroMind is a research agent that:

  • Takes your research questions
  • Searches the web using SearXNG (self-hosted, no API limits)
  • Fetches and reads relevant webpages
@rmtbb
rmtbb / Full-Page-Screenshot-Bookmarklet-by-Remote-BB.url
Created January 9, 2026 22:43
Full Page Screenshot Bookmarklet by Remote BB
javascript:(function(){var s=document.createElement('script');s.src='https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js';s.onload=function(){html2canvas(document.body,{useCORS:true,logging:false}).then(function(c){var a=document.createElement('a');a.download=(document.title||'screenshot')+'.png';a.href=c.toDataURL();a.click();});};document.body.appendChild(s);})();
@rmtbb
rmtbb / universalMailMergeByRemoteBB.gs
Last active December 25, 2025 23:35
UNIVERSAL MAIL MERGE (File ID or Draft Subject) by Remote BB
/**
* UNIVERSAL MAIL MERGE (File ID or Draft Subject) by Remote BB
*
* OVERVIEW:
* 1) Prompts the user for a single piece of text.
* - We first assume it's a Google Docs/Slides File ID.
* - If we can open the file AND it is Docs or Slides, we do a Docs/Slides merge.
* - Otherwise, we treat the input as part of a Gmail draft's subject and do an email merge.
*
* 2) Merges the data from the currently selected sheet:
@rmtbb
rmtbb / listgitfiles.sh
Created September 3, 2025 22:23
List Git Files - List raw GitHub URLs for files in a repo or subfolder, filtered by extensions
#!/usr/bin/env bash
# listgitfiles.sh
# List raw GitHub URLs for files in a repo or subfolder, filtered by extensions.
# Full README is embedded and printed only with: listgitfiles.sh -h|--help
set -euo pipefail
# ------------------------- Minimal Help (usage) -------------------------
print_min_help() {
cat <<'USAGE'