Skip to content

Instantly share code, notes, and snippets.

@jacobian
Created November 2, 2015 03:36
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 jacobian/bd4944bd10fc61f69e95 to your computer and use it in GitHub Desktop.
Save jacobian/bd4944bd10fc61f69e95 to your computer and use it in GitHub Desktop.
def imgcat(url):
content = base64.encodestring(urllib.urlopen(url).read())
text = "\033]1337;File=inline=1;size={0};px:{1}\a"
return text.format(str(len(content)), content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment