Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BinaryMuse/550075 to your computer and use it in GitHub Desktop.
Save BinaryMuse/550075 to your computer and use it in GitHub Desktop.
require 'coderay'
codeToHighlight = `pbpaste`
highlightedCode = CodeRay.scan(codeToHighlight, :ruby).div
IO.popen("pbcopy", mode='w') do |io|
io.write highlightedCode
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment