Skip to content

Instantly share code, notes, and snippets.

@chriscorwin
Last active August 29, 2015 14:00
Show Gist options
  • Save chriscorwin/11294682 to your computer and use it in GitHub Desktop.
Save chriscorwin/11294682 to your computer and use it in GitHub Desktop.
Grabs contents from clipboard, pastes it into a clipboard file, sends it to highlight to format it as RTF (and places result in clipboard), then creates a Gist of .html type and opens the Gist in the browser.
#!/bin/bash
touch '/Users/ccorwin/Google Drive/Documents/pasteboard.html'
pbpaste > '/Users/ccorwin/Google Drive/Documents/pasteboard.html'
highlight -O rtf -t 2 -K 11 -k 'Source Code Pro' '/Users/ccorwin/Google Drive/Documents/pasteboard.html' | pbcopy
gist --type html --open '/Users/ccorwin/Google Drive/Documents/pasteboard.html'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment