2008/06/20


これすごいわ。
wildoptions=autoとcomplete=lが凄い件 - Dis Communication - 符号無し

vimperator1.2pre 2008-06-19以降で実装されてるwildoptions=autoとcomplete=lがlifechangingだったので紹介しておきますね。

何が凄いって :set complete=l が凄い。「たかがtab押さなくても良くなっただけだよね」と思うでしょうが、使ってみたら無茶苦茶便利。
vimperator使いだと、おそらくURLを開くのに :open http://... とか「<c-l>」してアドレスバーにフォーカス合わしたりしてるかと思いますが、firefox3で登場したアドレスバーの便利機能(おせっかい機能とも言われてるらしい)、「AweSomeBar」
firefox-awesomebar
:open で使えるのです。例えば :open twitter teramako とすると
vimperator-awesomebar
と出るんです。URLなんか殆ど打たなくても良くなります。あとは通常と同じくtabで選べばok。すばらしい。
これでおそらくvimperatorがブラウジング最速になったかと思います。

ところで、vimperator使ってると稀にパススルーモードが外れてしまい、「Google Readerでキーバインドが効かなくなった」とか「LivedoorReaderで上手く動かなくなった」って事になったりします。
私の場合、以下の様にキーマップして回避しています。 noremap <c-i> :js modes.passAllKeys = true<cr>
ただ、これを使ってて気づいたのですがどうやらvimperatorの補完はmapで実行する「:ex」コマンドにも反応してる臭い。これはいずれ直るかと思うけど気になる様だったらパッチを送ってみよう。 とりあえずは、mapで実行するんじゃなくてaddUserMap使ってやる事にした。 javascript <<EOM
liberator.mappings.addUserMap([liberator.modes.NORMAL], ['<C-i>'],
    'Pass through mode',
    function () { liberator.modes.passAllKeys = true }
);
EOM
Posted at by



2008/06/19


グダグダの文章ですみません。
perl-monger.orgってはてなグループじゃダメなの? - DTP+印刷営業メモ

なんとなくだが近所の人がperl-monger.orgな話をしていてさっきページを見ていたんだけど、これってはてなグループ(なんとか部みたいな)のじゃダメなのかなぁ、と思った。

...snip...

っていうかWikiに色々なコンテンツを追加していくてのはダメなんだろうかと普通に思ったんだけど。

Wikiでもログイン制にしてしまえば同じような事は出来るし、弄れば同じ風貌に出来なくもないと思う。ただWikiだと筆者に掛かる責任ぽい物だとか、評価だとか、「perl-mongers」っていう組織感だとかが表現し辛いんじゃないかなぁ。
例えば「Journal of miyagawa」がWikiだったら少し感じが変ってくる様な気がする。(私だけかもしれない)

記事を原稿用紙に書くのかフリースケッチに描くのか...そんな程度の違いなのかもしれないけど、私は今の形がCoolだと思う。

答えになってないなぁ。

追記
組織感ってのは、例えばsubtechみたいなもんかな。
Posted at by




面白いもの見つけた。(via ku's twitter post)
Tumblr, RMagick and a Photo Frame! - igvita.com

Over the course of the past year or so, I got myself into a habit of using Tumblr for storing insightful snippets and quotes from my daily endeavours on the internet. Usually, this entails saving a paragraph (too long for tweet, and not enough for del.icio.us) so I can revisit it later.

However, having Tumblr to save the quotes is nice, but I rarely (if ever) went back to read them. Pondering this dilemma, I spotted my Phillips digital photo frame, and a quick weekend project was born: Tumblr API, RMagick to render the images, and an SD card full of wisdom and quotes for easy consumption!

どっちかって言うと、書いてる理由が面白い。要は「Tumblrの引用は面白いけど一々見に行くのめんどいよね!ならって事でデジタルフォトスタンドを使っちゃおうと思った」て感じかな。

動かすにはrubyのImageMagick拡張rmagickが必要。
私はPhillips digital photo frameは持ってないけど、chumbyとか使うと良く似た事出来るのかな?
ソースはそのまま使えました。日本語はImageMagickがghostscriptを使ってるのでTrueTypeフォント直接指定すれば動きます。
--- render-tumblr.rb.orig   Sat Jun 07 19:32:46 2008
+++ render-tumblr.rb    Thu Jun 19 12:02:57 2008
@@ -62,7 +62,7 @@
        img.background_color = "transparent"
        img.pointsize = 23
        img.antialias = true
-       img.font = "Helvetica"
+       img.font = "c:\\windows\\fonts\\meiryo.ttc"
    end
    quote.write "text.png"
    
@@ -72,12 +72,12 @@
        img.background_color = "transparent"
        img.pointsize = 18
        img.antialias = true
-       img.font = "Helvetica"
+       img.font = "c:\\windows\\fonts\\meiryo.ttc"
    end
    source.write "source.png"  
 end
 
-doc = Hpricot.XML(open("http://igrigorik.tumblr.com/api/read?type=quote&num=5"))
+doc = Hpricot.XML(open("http://mattn.tumblr.com/api/read?type=quote&num=5"))
 (doc/'post').each do |post|
    text = CGI::unescapeHTML((post/'quote-text').inner_html).gsub(/&[^;]*;?/,'')
    source = CGI::unescapeHTML((post/'quote-source').inner_html).gsub(/\<.*?\>/, '').gsub(/&[^;]*;?/,'').strip

実行するとquotesディレクトリに以下の様なファイルが出来上がりました。
render-tumblr-34978042

render-tumblr-36274314

render-tumblr-37077963

render-tumblr-37111519

render-tumblr-38695135

面白いですね。あとは何とかしてこれをchumbyとかで動かせればいいのですが、いかんせんchumby持ってない!chumbyでrubyが動くかどうかも知らない。
って事で誰か後はよろしく。
Posted at by