Send buffer or region code to linkode.org to generate an image.
Clone this repo somewhere
Add this to your config
(add-to-list 'load-path "path where the repo was cloned")
(require 'linkode)
(use-package linkode
:ensure t)
M-x linkode-region
to use the selected region
M-x linkode-buffer
to use the buffer content
The code will be send to linkode and the resulting link will be copied to the clipboard