Skip to content

Instantly share code, notes, and snippets.

@siyo
Created October 13, 2011 16:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siyo/1284689 to your computer and use it in GitHub Desktop.
Save siyo/1284689 to your computer and use it in GitHub Desktop.
=͟͟͞͞ビ=͟͟͞͞ュ=͟͟͞͞ー=͟͟͞͞ンってやりたいとき用earthquake.gem plugin
# -*- coding: utf-8 -*-
# byun tweet / earthquake plugin
#
# e.g. :byun hoge # => update '=͟͟͞͞h=͟͟͞͞o=͟͟͞͞g=͟͟͞͞e' [Yn]
#
Earthquake.init do
command %r|^:byun\s*(\d+)*\s+(.+)$|, :as => :byun do |m|
cmd = m[1] ? ":reply #{m[1]}" : ":update"
input("%s %s" % [cmd, m[2].each_char.inject(""){|s,c| s << "=͟͟͞͞#{c}"}])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment