Skip to content

Instantly share code, notes, and snippets.

@emctague
Created January 14, 2026 19:21
Show Gist options
  • Select an option

  • Save emctague/cfbe0395f86d6e8c21e1b4d73f89ba25 to your computer and use it in GitHub Desktop.

Select an option

Save emctague/cfbe0395f86d6e8c21e1b4d73f89ba25 to your computer and use it in GitHub Desktop.
quick graphviz scripts (macOS)
#!/bin/bash
# usage: digraph "A -> B; B -> C; A -> C; ..."
echo "digraph { graph [ dpi = 300 ]; $@ }" | dot -Tpng | open -f -a Preview
#!/bin/bash
# usage: graph "A -- B; B -- C; A -- C; ..."
echo "graph { graph [ dpi = 300 ]; $@ }" | dot -Tpng | open -f -a Preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment