Created
January 10, 2012 09:25
-
-
Save hagiyaki/1588051 to your computer and use it in GitHub Desktop.
スーパードライ earthquake.gem plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # superdry tweet / earthquake plugin | |
| # | |
| # superdry: http://shindanmaker.com/43570 | |
| # | |
| require 'httpclient' | |
| Earthquake.init do | |
| command :asahi do | |
| url = "http://shindanmaker.com/43570" | |
| html = HTTPClient.new.post(url, { :u => rand(Time.now.to_i), :from => ""} ) | |
| r = nil | |
| html.body.split("\n").detect{|e| r = e.match(/>\s+?(.+)\s+#asahisuperdry/)} | |
| input(r[1]) if r | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment