Skip to content

Instantly share code, notes, and snippets.

@ompugao
Created May 21, 2012 12:22
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 ompugao/2762091 to your computer and use it in GitHub Desktop.
Save ompugao/2762091 to your computer and use it in GitHub Desktop.
earthquake growl notify
require 'ruby_gntp'
Earthquake.init do
output do |item|
next unless item["_stream"]
if item["text"]
GNTP.notify({:app_name => "earthquake",:title => item["user"]["screen_name"],:text => item["text"],:icon => item["user"]["profile_image_url"]})#icon_path(user.screen_name, user.profile_image_url) })
#if /@sifikinoko(?:[\s:]|$)/ =~ item["text"]
# system{
# 'notify-send',
# '--urgency','critical',
# item["user"]["screen_name"],
# item["text"]
# }
#end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment