Skip to content

Instantly share code, notes, and snippets.

@DOGEME
Created January 31, 2013 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DOGEME/4678967 to your computer and use it in GitHub Desktop.
Save DOGEME/4678967 to your computer and use it in GitHub Desktop.
定時出社するやつ
# -*- coding: utf-8 -*-
# teiji syussya tweet / earthquake plugin
#
# teiji: http://shindanmaker.com/311937
#
require 'httpclient'
Earthquake.init do
command :teiji do
url = "http://shindanmaker.com/311937"
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}/)}
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