パーソナルツール
現在位置: ホーム 日々のメモ書き archive 2007

2007

Sub-archives

2007年12月17日

Collective SVN report

by TANIGUCHI Takaki — last modified 2007年12月17日 00時13分
Filed Under:

2007-12-16

  • r55218 Collage - Added portlets views
  • r55257 ATFlashMovie - Added a portlet view for Collage
  • 55259 CalendarX - plone-3-compatibility
  • r55270 CalendarX - We're giving up on the product as it stands and creating an Archetypes version of CalendarX.
  • r55326 slideshowfolder 3.0 alpha 1
  • r55504 collective.richdocthumb - Simple example package on how to add thumbnail images in folder summary views to RichDocument.

風林火山

by TANIGUCHI Takaki — last modified 2007年12月17日 00時16分

最終回でした。

真面目に見たのは久しぶりだな。内野・市川・Gacktのの三者の演技に迫力があった。回想シーンとの差がすごいよ。陽炎の向こうの政虎、あれよかったなあ。

来週からはどうしよう。

2007年10月14日

Collective SVN report

by TANIGUCHI Takaki — last modified 2007年10月14日 01時24分
Filed Under:

2007-10-08

  • r50550 oi.plum - SCRUM  project management for Plone
  • r50576 BernArticle - Plone 3 compatibility branch
  • r50603 Vaporisation - (formlib sample? portlets?)
  • r50680 slideshofolder -  We now have the ability to designate folders as "Slideshow Folders" regardless of their content.
  • r50831 PloneHelpCenter - 1.0

imapfilter

by TANIGUCHI Takaki — last modified 2007年10月14日 16時33分
Filed Under:

imapfilter - filter mail in your IMAP account

メールをIMAPサーバー上で整理してくれるツールを捜していたらみつかった。Luaで書かれていて、設定ファイルもLuaだったのでLuaの勉強を開始。まあ、それなりに整理ができるようになった。いままでprocmailでやっていたことが大体できるようになったかな。MLの整理が問題であったのだが、ごにょごにょ関数を書いてできるようになりました。

function match_ml(account, field, contain, match_reg, path_base, m_t)
result = account1.INBOX:contain_field(field, contain)
messages = account1.INBOX:fetch_fields({field},result)
if messages then
for msgid, msgtxt in pairs(messages) do
success, capture = regex_search('^'..field..': '.. match_reg, msgtxt)
if success then
folder = path_base .. capture
if not m_t[folder] then
m_t[folder] = {}
end
m_t[folder][msgid] = true
end
end
end
end

--
-- main
--

m_t = {}
-- debian
match_ml(account1, 'X-Mailing-List', '@lists.debian.org',
'<([^@]+)', "tmp.debian.", m_t)
match_ml(account1, 'Recent-From', '@lists.debian.org',
'<([^@]+)', "tmp.debian.", m_t)
match_ml(account1, 'Recent-To', '@lists.debian.org',
'<([^@]+)', "tmp.debian.", m_t)
-- fml
match_ml(account1, 'X-ML-Name', '', '([a-zA-Z0-9_-]+)',"tmp.misc-ml.", m_t)
-- mailman
match_ml(account1, 'X-BeenThere', '', '([^@]+)',"tmp.misc-ml.", m_t)
-- google
match_ml(account1, 'X-Apparently-To', '', '([^@]+)',"tmp.misc-ml.", m_t)

for folder, result in pairs(m_t) do
account1.INBOX:move_messages(account1[folder], result)
-- account1.INBOX:unmark_seen(result)
end

苦労したのは附属のサンプルが間違っていたこと。Webサイトのほうは更新されていてドキュメントの通りにやったら動いた。table.insert(result,msgid)とやっては駄目。result[msgid] = trueとやる。

Plone SVN report

by TANIGUCHI Takaki — last modified 2007年10月14日 16時56分
Filed Under:

2007-10-14

  • r17538 3.0.2
  • r17565 plone.app.blob
  • r17582 plone.commenting - the home for the non-plone dependant part of plone's new commenting framework

Collective SVN report

by TANIGUCHI Takaki — last modified 2007年10月14日 16時57分
Filed Under:

2007-10-14

  • r51135 slideshowfolder - 1.1
  • r51153 eXtremeManagement - 1.5
  • r51218 PolicyTestCase - initial import
  • 51223 PlonePopoll - 2.6.1
  • r51228 example - This contains examples of a number of different types of tests.
  • r51249 BernArticle - Plone 3 compatibility branch
  • r51218 KupuFormlibWidget
  • r51336 eXtremeManagement - joris-graphs branch

sshguard

by TANIGUCHI Takaki — last modified 2007年10月14日 19時54分
Filed Under:

sshguard - Protects networked hosts from the today's widespread

sshに対してうっとうしいアタックを叩き落とすためのもの。logを監視して変なアクセスを遮断する。Linuxならnetfilterと連携する。

iftop

by TANIGUCHI Takaki — last modified 2007年10月14日 20時05分

iftop - displays bandwidth usage information on an network interface

iftop.png

インターフェイス毎の接続状況を表示。

2007年10月07日

香嵐渓まで

by TANIGUCHI Takaki — last modified 2007年10月07日 23時33分
Filed Under:

香嵐渓までトレーニングで走ってきた。

R153のコンビニが随分潰れていた。客入らんのかね。ここのところのコンビニ業界の斜陽化というところだろうか。

足助トンネルはまだ通れなかった。トンネルはできていたようだが、そこまでの道がまだ。自転車では走りやすいのだろうか。

ふと、廃線された三河線のことを思う。足助まで行っていたらもうちょっと続いたのだろうか。猿投から先は非電化だったんだね。

バイパスができたら観光シーズンの渋滞はどうなるんだろうか。

2007年09月15日

torus-trooper

by TANIGUCHI Takaki — last modified 2007年09月15日 21時13分
Filed Under:

torus-trooper - speeding ship sailing through barrage

torustrooper.png

スピード感のある3Dシューティングゲーム。なかなか面白い。

追記: 大部がんばっている。チャージなんか使わないで通常弾だけでぶっとばすほうが効率よくボスまで行ける。

さらに追記: 敵を追い越すだけでいいので弾を発射しなくて、ひたすら加速で弾幕避けだけやっていてもいい。シューティングじゃねーだろ。

2007年07月30日

イラク(1-0)サウジアラビア

by TANIGUCHI Takaki — last modified 2007年07月30日 00時19分
Filed Under:

決勝らしい試合になったなあ。

とにかく走る走る。シュートをばんばん打つ。イラクの勢いのほうがすごかったな。

中盤の構成力では日本がはるかにレベルの高いことをやっているのだが。サッカーをするとはそういうことではないということだな。

MySQLが起動しない

by TANIGUCHI Takaki — last modified 2007年07月30日 22時12分
Filed Under:

Fatal error: Can't open and lock privilege tables: Incorrect file format 'host' と出た。

mysqlのdb・host・userを削除してからmysql_install_dbで初期化すればとりあえず治る。壊れたのかなあ。

mysqld --skip-grant-tables で起動するあたりそのあたりなんだろう。

バックアップから持ってくる。ただ、バックアップがonlineで取ったやつなのでこんどは壊れているか言い出すのでmyisamchk -r foo.MYI で復旧させる。

2007年07月05日

登頂日記

by TANIGUCHI Takaki — last modified 2007年07月05日 23時49分

行ってきました、新装開店マウンテン。

振り返れば10年以上このお店に通っているよ。年に一度しか行かないときもあったけどね。

さて、行ってみると相変わらずの客層ですよ。大学生とおぼしき集団が甘味と鍋だけ頼んでいる風景。でもお店の雰囲気はすっかり変わっていた。明るい、中に入ってまず思う。あの昼間でも薄暗かった店内がすっかり変わっていた。白い壁紙に、綺麗な椅子。窓から入る明かり。きれいな喫茶店に見えるよね。

でも、料理は相変わらず。お店の人も変わらず。おおざっぱなスパゲッティ。30分以上待たされる料理。一人ではつらいです…。もうちょっと大勢で来たいものです。

2007年07月04日

HPとDebian

by TANIGUCHI Takaki — last modified 2007年07月04日 00時38分
Filed Under:

HPがProliantでのDebianの動作検証をしてくれている。

ただまだSargeなのが残念。おー、これでますますHPだな。

2007年04月17日

cowdancer

by TANIGUCHI Takaki — last modified 2007年04月17日 23時17分
Filed Under:

Copy-on-write directory tree utility.

あるディレクトリツリーをhardlinkでコピーして、Copy-on-writeで編集するユーティリティ。cowbuilderというユーティリティがpbuilderみたいに動作すると。pbuilderが毎回展開するのでベース部分を作っておいてcopy-on-writeで必要な部分だけパッケージをインストールする形にするということかな。なるほど。

2007年03月24日

OpenDSでMulti-master

by TANIGUCHI Takaki — last modified 2007年03月24日 22時33分
Filed Under:

SunがOpenDSというDirectory Serverを開発している。これは既にMulti-masterを実装しているので試してみた。

もちろん知ってのとおりSun MicrosytemsはiPlanet由来のSun Java Directory Serverを持っている。エンタープライズ用途にも耐えられる立派なものである。でこのOpenDSはJavaで一から実装しているDirectory Serverである。ちなみにSunはOpenDSを作ったからといってSJDSをやめるつもりはないと言っている。

現在のOpenDSはあくまで開発中という位置付けではあるが既にMulti-masterを実装しておりなかなか意欲的な仕上がりを見せている。OpenDSを使
うにはサイトからダウンロードしてインストーラに適当に打ち込めばいいので省略してMulti-masterの実験をしよう。
なお、これはOpenDS-0.1-build-032に基いている。

まず、OpenDSを2箇所に展開する。便宜上OpenDS1とOpenDS2と呼ぶことにする。それぞれの初期セットアップをすませる。LDAPのポートは10389と20389とでもしておく。もし、別のサーバが用意できるのなら別のサーバで動かしてもよい。OpenDS1とOpenDS2の両方にdc=example,dc=comのbaseDNを作っておくこと。OpenDS1には適当にデータを入れておく。

次にOpenDS1のconfig/config.ldifを編集する。syncronization.ldifを後にくっつける。
dn: cn=example, cn=Multimaster Synchronization,cn=Synchronization Providers,cn=c
onfig
objectClass: top
objectClass: ds-cfg-synchronization-provider-config
cn: example
ds-cfg-synchronization-dn: dc=example,dc=com
ds-cfg-changelog-server: localhost:18989
ds-cfg-changelog-server: localhost:28989
ds-cfg-directory-server-id: 1
ds-cfg-receive-status: true

dn: cn=Changelog Server, cn=Multimaster Synchronization, cn=Synchronization Prov
iders, cn=config
objectClass: top
objectClass: ds-cfg-synchronization-changelog-server-config
cn: Changelog Server
ds-cfg-changelog-port: 18989
ds-cfg-changelog-server: localhost:18989
ds-cfg-changelog-server: localhost:28989
ds-cfg-changelog-server-id: 1
ds-cfg-changelog-portが自分自身の同期に使うポート、ds-cfg-changelog-serverはMasterになるサーバーを指定する。OpenDS1とOpenDS2のことですな。ds-cfg-directory-server-idがMaster毎に違う番号を割り振る。OpenDS1には1番を割り振る。

次はOpenDS2の設定だが、ds-cfg-changelog-portは当然変えておくこと。28989ですね。ds-cfg-changelog-server-idは2にする。以上で設定はおわり。OpenDS1とOpenDS2の両方を起動させる。あとは適当にデータをいじってみよう。LDAP Studioでやれば二つのサーバを同時に参照できるので楽だろう。片方の変更が即座に両方に反映させるのがわかるだろう。もちろんMulti-masterなのでどちらを変更しても大丈夫。
そして片方のサーバーを停止させて、もう片方で変更を加えたとしても、次に起動させるときちんと同期が取れている。

OpenLDAPに苦労している身にとってはもう使ってしまおうかしらんと思うような素晴しいソフトウェアである。

参考

2007年01月27日

postfixでFrom:で送信制限

by TANIGUCHI Takaki — last modified 2007年01月27日 15時24分

postfixを使ってFrom:を見て制限をかける方法。

いや、こんなの意味ないだろとかいう話は置いといて。
main.cfに
header_checks  = regexp:/etc/postfix/bad_header

とか書いて、

bad_headerに
/^From: hoge@example.com/ OK
/^From: bar@example.com/ REJECT
などと書いておく。ファーストマッチになります。

ref:
http://www.kozupon.com/mail/postfix2.html

From:で制限をPostfixで

by TANIGUCHI Takaki — last modified 2007年01月27日 16時03分

意味あるのかという議論は置いといて。

From:(に限らずヘッダ全般)を見てメールの制限をするにはmain.cfに以下のように記述する。
header_checks = regexp:/etc/postfix/bad_header

そのあと header_checks に

/^From: bar@example.com/ REJECT
/^From: foo@example.com/ OK

と書く。

http://www.kozupon.com/mail/postfix2.html

FCKEditor-2.3.2

by TANIGUCHI Takaki — last modified 2007年01月27日 16時10分
Filed Under:

FCKEditorを2.3.2にupgrade

注意するべきこと。/portal_properties/fckeditor_propertiesをアップデートの前に削除すること。

Javascriptがキャッシュに残っていると挙動がおかしいようなので適宜対処する。

2007年01月16日

キミのコードが汚い理由

by TANIGUCHI Takaki — last modified 2007年01月16日 23時26分
Filed Under:

汚いコードときれいなコードの例らしい。

http://www.atmarkit.co.jp/im/carc/serial/redge51/redge51.html
なんだこりゃ…。冗談だろ。2が本当にきれいなのか?悪い例にしか見えねー。何やってんのかわからんコードは良いコードではない。この文章に言及したサイトがたくさんあるが、これは釣りに違いない。釣られてやるー。
takaki's twitter
焼酎風味の水に500円も取ろうとはどういう店だ。 2010年03月09日 22時53分
ジョブカードなる糞エクセル方眼紙を埋め中。心が折れそうだ。 2010年03月08日 22時16分
Excel方眼紙がOOoで崩れるわけだが。 2010年03月04日 22時49分
嫌味言ってりゃ世の中良くなるわけでもなし 2010年03月04日 22時06分
どう考えても風邪だがタイミングが悪すぎる 2010年03月02日 23時51分
Affiliate