2009-06-01から1ヶ月間の記事一覧

Mechanize 0.9.3不調

Fedora11にしたら Mechanizeが0.9.3になって派生クラスが使えなくなった。 require "rubygems" require "mechanize" class MyMechanize < WWW::Mechanize end agent = MyMechanize.new page = agent.get("http://www.google.com") p page # p でpretty print…

自宅サーバー(Postfix)から外へメールを送る その2

id:otn:20090604 の続き。 今度は、SMTP認証に。プロバイダが nifty で、アカウントが foofoobar@nifty.com、パスワードが pasuwaado の場合。(1) main.cf に設定追加 relayhost = [smtp.nifty.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_map…

ruby 0.95 - the object-oriented script language

ふと、「あるかなー?」と思って、Google Groupでfj.lang.miscを検索してみたらありました。http://groups.google.co.jp/group/fj.comp.oops/browse_frm/thread/fa71db62ce4b9c5/ab535315595a8e6f?hl=ja&tvc=1&q=matsumoto#ab535315595a8e6f ニュースグルー…

if 0 でどうなるか

エラーになる: Fortran,COBOL,Algol,Pascal,Java,sh 偽と見なす: PL/I,C,C++,VB系,JavaScript,Python,Perl,PHP,Groovy,csh,awk,(unixのexpr) 真と見なす: Lisp系,Ruby,(unixのtest) exprとtestは、ifじゃないけど、おまけ。他の言語の情報求む。

自宅サーバー(Postfix)から外へメールを送る

あまり必要性はないのだが、VMware上で時々起動しているLinuxOSから外にメールを送る設定の覚え書き。 何もしないと、Senderに送り返せないので駄目というエラーメールが返ってくる。プロバイダが nifty で、アカウントが foofoobar@nifty.com、LinuxOSのホ…