Skip to content

Instantly share code, notes, and snippets.

View ttscoff's full-sized avatar
💭
Breathing

Brett Terpstra ttscoff

💭
Breathing
View GitHub Profile
@ttscoff
ttscoff / ithoughts-to-mermaid.md
Last active February 21, 2026 12:39
Convert iThoughts X mind map to Mermaid diagram. Save ithougts.md and python file to .cursor/mermaid, and ithoughts-to-mermaid.md to .cursor/commands

iThoughts to Mermaid Mindmap (Cursor command)

Convert an iThoughts .itmz mind map file into a Mermaid mindmap for display in Cursor.

Instructions

  1. Get the itmz path: The user may provide a path (e.g. from iCloud: ~/Library/Mobile Documents/iCloud~com~toketaware~ios~ithoughts/Documents/Map Name.itmz). If no path is given, ask for it.

  2. Run the converter:

@ttscoff
ttscoff / connections.rb
Last active February 21, 2026 10:50
NYT Connections cheater CLI
#!/usr/bin/env ruby
# frozen_string_literal: true
# Requires nokogiri and chronic (optional)
# Get hints for the New York Times Connections game from Mashable's daily article.
# Usage: connections.rb [--date STRING] [type]
# Types: hint, category, answer, words (default)
# hint: Cryptic hints about the categories
# category: The four category names
@ttscoff
ttscoff / ithoughts.md
Created February 20, 2026 10:39
Cursor iThoughts integration. Add to .cursor/commands/ithought.md to be able to read a mind map and generate a plan from it.

Read iThoughts X mind map and use it for planning

You will receive a file path to an iThoughts X mind map (.itmz file). Use it as follows.

1. Resolve and validate the path

  • Treat the path as the user’s chosen .itmz file (e.g. from a Cursor command that passes the current file or a path argument).
  • If the path is relative, resolve it from the workspace root.
  • If the file does not exist or is not an .itmz file, say so and stop.
@ttscoff
ttscoff / yt-md.rb
Last active October 18, 2025 16:37
YouTube -> Markdown using BrettTerpstra.com/yt-md/api
#!/usr/bin/env ruby
# Simple CLI wrapper that queries https://brettterpstra.com/yt-md/api
# Usage: yt-md.rb [--title "Custom Title"] <YouTube URL or ID>
require 'optparse'
require 'net/http'
require 'uri'
require 'cgi'
options = {}
@ttscoff
ttscoff / ripple.rb
Last active September 2, 2025 14:16
A command line tool (and library) for creating a ripple effect on text, for progress animation
#!/usr/bin/env ruby
# frozen_string_literal: true
# ripple - A simple Ruby script to create a text ripple effect in the terminal.
## From the command line, you can run:
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional
## Run a command during the animation:
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional --command "sleep 5"
# This will animate the text "Your Text Here" with the specified options, and run the command in the background.
@ttscoff
ttscoff / Marked 3.0 Release Notes.md
Created May 23, 2025 16:09
Release notes for the upcoming Marked 3

Marked 3.0.0 (1072)

An all-new, best-in-class DOCX exporter. Marked can now even open DOCX files and export them as Markdown or any other format.

New Markdown processors built in: CommonMark (with GFM extensions) and Kramdown! Kramdown adds the ability to apply ids, clases, and other attributes to inline and block elements, among other features.

Let's see, what else?

NEW

@ttscoff
ttscoff / invisi
Last active May 29, 2025 20:35
Bash script to show/hide invisible files on macOS
#!/bin/bash
while test $# -gt 0; do
case "$1" in
hide)
defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder
;;
show)
defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder
;;
@ttscoff
ttscoff / corp speak.md
Last active April 7, 2025 18:21
Output of my new random sentence generator on Corporate setting

Random Combined Sentences:

1:

Random medium sentence

@ttscoff
ttscoff / left-cmd-fn-jkil-to-arrow.json
Last active June 17, 2025 23:57
Collection of Karabiner rules for converting ;-hikl to arrow keys, '-hikl to fn-arrow
{
"description": "Change Left_command + Fn + J/K/I/L to Arrow Keys",
"manipulators": [
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["left_command", "fn"],
"optional": ["any"]
}
@ttscoff
ttscoff / bookmarker
Last active February 24, 2025 10:35 — forked from rhsev/bookmarker
(This script has moved to <https://github.com/ttscoff/bookmarker>) This script acts as a wrapper for Brett Terpstra's [bookmark-cli](https://github.com/ttscoff/bookmark-cli). It shortens long bookmark IDs to 9-digit numbers and stores the mappings in a JSON file. The short ID is also added to the file’s Spotlight metadata. This ensures manageabl…
#!/usr/bin/env ruby
require "json"
require "securerandom"
require "optparse"
# This script has been moved to https://github.com/ttscoff/bookmarker
# Created by Ralf Hulsmann
#
# A wrapper around