Skip to content

Instantly share code, notes, and snippets.

@hagiyaki
Forked from DOGEME/ogyohee.rb
Created January 19, 2012 17:11
Show Gist options
  • Save hagiyaki/1641241 to your computer and use it in GitHub Desktop.
Save hagiyaki/1641241 to your computer and use it in GitHub Desktop.
byunしながらオギョヒーっていう時用 / earthquake.gem plugin
# -*- coding: utf-8 -*-
# ogyohee tweet / earthquake plugin
#
# ogyohee: http://shindanmaker.com/152454
#
require 'httpclient'
Earthquake.init do
command :byunogyo do
url = "http://shindanmaker.com/152454"
html = HTTPClient.new.post(url, { :u => rand(Time.now.to_i), :from => ""} )
r = nil
html.body.split("\n").detect{|e| r = e.match(/>\s+?(.+)#{url}/)}
text=r[1].force_encoding("UTF-8")
input(text.each_char.inject(""){|s,c| s << "=͟͟#{c}"}) if r
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment