Skip to content

Instantly share code, notes, and snippets.

@davidchambers
Forked from adrusi/open_in_hashify.rb
Created May 15, 2011 23:10
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 davidchambers/973656 to your computer and use it in GitHub Desktop.
Save davidchambers/973656 to your computer and use it in GitHub Desktop.
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