僕の残り短い20代をカウントするスクリプト

待って!まだ逃げていかないで、僕の20代!


#! /usr/bin/ruby

require 'time'
require 'rubygems'
gem 'twitter4r'
require 'twitter'
require 'pit'

require 'open-uri'
require 'kconv'

# Twitter4R バグ回避
require 'cgi'
class Hash
def to_http_str
self.map{|key,value| "#{key}=#{CGI.escape(value.to_s)}"}.join("&")
end
end

begin

tday = Date.today
bday = Date.new(2009,3,8)
zday = bday - tday

mess = "The one's twenties of smokeymonkey is " + zday.to_s + " another."

# Ej9F
config = Pit.get("Twitter")
cl = Twitter::Client.new(config)
cl.status(:post,mess)

rescue
print "RuntimeError: ", $!, "\n";
end

このブログの人気の投稿

転職のお知らせ

40代の減量戦略 〜体重-14kg、体脂肪率-12%を実現した具体的な方法〜

45歳になりました