Skip to content

Instantly share code, notes, and snippets.

@siyo
Created January 5, 2012 13:49
Show Gist options
  • Save siyo/1565332 to your computer and use it in GitHub Desktop.
Save siyo/1565332 to your computer and use it in GitHub Desktop.
Jラッパーっぽいつぶやきするやつ / earthquake.gem plugin
# -*- coding: utf-8 -*-
# jrapper tweet / earthquake plugin
#
# jrapper: http://shindanmaker.com/54175
#
require 'httpclient'
Earthquake.init do
command :jrapper do |m|
html = HTTPClient.new.post("http://shindanmaker.com/54175", { :u => m[1], :from => "" } )
m = nil
html.body.split("\n").detect{|e| m = e.match(/>\s+?(.+)\s+\#jrapper/)}
input(m[1]) if m
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment