Archive for the ‘Mac’ Category

Pandoc

Convert Markdown to Slides

  1. Write Markdown, using headings to chunk your file into sections. Each heading will be its own slide.
  2. Annotate the markdown file with YAML by adding a document header:
title:
 - RAG Pipeline
author:
 - Bobby Ratliff
theme: 
 - Copenhagen
date:
 - March 4, 2026

Then convert the markdown file to html:

pandoc -t slidy -s rag-pipeline.txt -o rag-pipeline.html

For more information, see the Pandoc Manual.

Convert Markdown to PDF

Install dependencies

brew install pandoc
brew install --cask basictex
# Ensure latex utilities are on the PATH
eval "$(/usr/libexec/path_helper)"

Convert the document

pandoc -s 'rag pipeline.md' -o 'rag pipeline.pdf'

Java on Mac Cheat sheet

Install AdoptOpenJDK following instructions for macOS. The instructions don’t say where to install it, I suggest /Library/Java/JavaVirtualMachines. This will get you the built-in mac behavior.

Built-in mac behavior

Older versions of Java created a Java button in System Preferences. It will not show Java 11, but it will show older versions. In my case, I had some old projects using Java 8.

The other built-in is the java_home utility.

List available versions

alias javas_avail='/usr/libexec/java_home -V'

Example output:

Matching Java Virtual Machines (2):
11.0.1, x86_64: "OpenJDK 11.0.1" /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
1.8.0_161, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home

Switch to a specific version

java_home will also allow you to switch to a given version. For example

$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

If you find yourself switching versions a lot, create an alias for it.