Skip to content

Instantly share code, notes, and snippets.

@fkfk
Forked from yohfee/notify.rb
Created April 1, 2011 16:41
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 fkfk/898457 to your computer and use it in GitHub Desktop.
Save fkfk/898457 to your computer and use it in GitHub Desktop.
#coding: utf-8
Earthquake.init do
config[:notify] = [/ruby/i, /#earthquake.gem/i]
output do |item|
next unless item["stream"]
if config[:notify].any?{|pattern| pattern =~ item["text"]}
notify item["text"], :title => item["user"]["screen_name"]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment