Skip to content

Instantly share code, notes, and snippets.

@siyo
Created October 30, 2011 03:05
Show Gist options
  • Save siyo/1325416 to your computer and use it in GitHub Desktop.
Save siyo/1325416 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
#
require 'glitch-ime'
Earthquake.init do
command %r|:glitch\s*(\d+)*\s*(.*)$|, :as => :glitch do |m|
cmd = m[1] ? ":reply #{m[1]}" : ":update"
input("%s %s" % [cmd, GlitchIME.new(m[2]).generate])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment