Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TextMate command to open a markdown document in hashify.me
#!/usr/bin/env ruby
require "base64"
message = "HG: Enter commit message. Lines beginning with 'HG:' are removed."
data = STDIN.read
data.gsub!(/^HG: .+\n/, '') if data.include? message
%x[open http://hashify.me/#{Base64.encode64(data).gsub(/\n/, '')}]
=begin
+-[ COMMAND SETTINGS ]------------+
| Save: nothing |
| Input: entire document |
| Output: discard |
+---------------------------------+
=end
@davidchambers
Copy link
Author

Bundles » Bundle Editor » Edit Commands…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment