2005-02-02 (水) [長年日記]
1 [本]
30歳からの成長戦略 「ほんとうの仕事術」を学ぼう(山本 真司)
某MLで紹介されていたので買ってみた。本書が優れているのは、まず最初に若者の悩みとして「3つの病」を挙げ、読者のハートをキャッチすることに成功している点に尽きる(こういう本って内容は一緒で、あとは書き方次第なんだよね*1)。
3つの病とは、
- 負け組編入恐怖症
- 戦略不在症候群
- 目標モデル喪失症
なんだけど、ぼくも(2)の戦略不在症候群にかかっている自覚症状があるのよね。いろいろやらなきゃいけないことはあるんだけど、あれこれ手をつけてらんない、あーどーしよー、時間ねえし、うおー、みたいな。
この病の悪循環を断ち切るためにどうすればいいか……というところまでが、本書の導入部。あとは、まあよくある自己啓発みたいなのと、簡単なロジカルシンキングの解説みたいなもの*2。
結論としては、「実力派天邪鬼」っていうキーワードと、(人気のないもの)×(好きなこと)というキャッチーな式になるわけだけど、書き方がうまいのでそんなに嫌な感じがしない。ビジネス書とか読む習慣のないひとは、まあ読んでもいーんじゃねーの?
作者の方はblogもやってるそうな。
※それにしてもAmazonのレビューが悉くキモいわけだが。
2 SYS-CON Media Opens Its Eighth Annual "Readers' Choice Awards" Polls (SYS-CON)
July 31, 2005 まで投票は続くらしい。
つか、IBMすげーなー(よつば風)。
4 [tDiary] delicious.rb (2)
まるでmm_footer.rbなんですが。
今度はキャッシュするようにしました。 というか、全部パクりものなんですが...。
iconvだとエラーが出ることがあるのでuconvにしてみました(これもそのまま拝借)。
前回のは僕も入れる気なかったですが、今回のはちゃんと入れましたので。
=begin
delicious.rb
del.icio.us から その日付分のメモを取ってきて表示するプラグイン
tdiary.conf で以下を設定します。
@options['delicious.id'] = 'YOUR DELICIOUS ID HERE'
@options['delicious.pw'] = 'YOUR DELICIOUS PW HERE'
proxy は以下に設定します。
@options['amazon.proxy'] = 'PROXY_HOST:PORT'
reference:
* mm_footer.rb by ishinao san
* rss-show.rb (in Hiki) by TAKEUCHI Hitoshi san
=end
require 'uconv'
require 'nkf'
def deli_get_xml
cache_file = "#{@cache_path}/delicious"
begin
deli_recent_cache(cache_file)
raise unless test(?r, cache_file)
open(cache_file).read
rescue Exception
$!
end
end
def deli_recent_cache(cache_file)
cache_time = 60 * 60
begin
raise if Time.now > File::mtime(cache_file) + cache_time
rescue
begin
require 'net/http'
proxy_addr = nil
proxy_port = nil
if /^([^:]+):(\d+)$/ =~ @options['amazon.proxy'] then
proxy_addr = $1
proxy_port = $2.to_i
end
Net::HTTP.version_1_2
req = Net::HTTP::Get.new("/api/posts/all")
req.basic_auth @options['delicious.id'], @options['delicious.pw']
req.basic_auth @options['delicious.id'],@options['delicious.pw']
Net::HTTP::Proxy(proxy_addr, proxy_port).start('del.icio.us') do |http|
response = http.request(req)
deli_write_cache(cache_file, response.body)
end
rescue
$!
end
end
end
def deli_write_cache(cache_file, xml)
File.open(cache_file, 'w') do |f|
f.flock(File::LOCK_EX)
f.puts xml
f.flock(File::LOCK_UN)
end
end
def deli_parse_xml_by_date(xml, yyyymmdd)
require "rexml/document"
require "time"
# require 'iconv'
posts = []
REXML::Document.new(xml).elements.each("posts/post") do |post|
if Time.parse(post.attribute("time").to_s).localtime.strftime('%Y%m%d') == yyyymmdd
# TODO: UTF-8 to EUC-JP
post = [
post.attribute("href").to_s,
force_to_euc(post.attribute("description").to_s),
force_to_euc(post.attribute("extended").to_s),
post.attribute("hash").to_s,
force_to_euc(post.attribute("tag").to_s),
Time.parse(post.attribute("time").to_s).localtime
]
posts << post
end
end
return posts
end
add_body_leave_proc do |date|
#add_edit_proc do |date|
if xml = deli_get_xml
posts = deli_parse_xml_by_date(xml, date.strftime("%Y%m%d"))
if posts.size !=0
rt = "<div class=section>\n<h3>Today's News Clip</h3>\n"
rt << "<ul>\n"
posts.each do |post|
rt << "<li><a href=#{post[0]}>"
rt << CGI::escapeHTML(post[1])
rt << '</a><span class=info_link>'
rt << "[<a href=http://del.icio.us/url/#{post[3]}>others</a>]</span>"
rt << '</li><br>'
rt << "<span style='font-size:70%;color:silver;'>#{post[0]}</span><br>"
rt << '<p class=expanded>'
rt << CGI::escapeHTML(post[2])
rt << '</p>'
end
rt << "</ul>\n</div>"
end
else
''
end
end
def Uconv.unknown_unicode_handler(unicode)
raise Uconv::Error
end
def force_to_euc(str)
begin
str2 = Uconv.u8toeuc(str)
rescue Uconv::Error
str2 = NKF::nkf("-e", str)
end
return str2
end
5 [BM]『capsctrldays』に関する詳細情報 - blogmap
あー便利だなあ。
[]
| 
del.icio.usのクリップ、1つだけ化けてますね。
あーなんでしょうねえ。元データを書き換えとこ(手抜き)。