6月
Sub-archives
2007年06月24日
Torcs 1.3.0
Torcs 1.3.0がリリースされていた。
Suzukaが入っていたのがうれしい。全長がなぜか6200mぐらいある。しかし難しいコースだな。
python-fuse
exampleをためしてみた。
python-fuseに含まれているexampleを使用する。
# python hello.py /mnt/point
でマウントする。あとはcdして、lsとかcatをする。
unmountは次のようにする。
# fusermount -u /mnt/point
Amarok
KDEの音楽プレーヤー
こんな感じ。

友人が使っているのを見て使ってみた。
FCKEditorの改行
FCKEditorで改行するといつ頃からかbrではなくp扱いになっていた。それはいいのだが。
preの部分でぶちぶち切られるのは困るなと思ったらShift+Enterでできる。ちなみにこれは設定で変更できる。全然気にしてなかった。
今年のcrra はりちゅうロード
今年もはりちゅうロードに出ようかとどうか調べてみたら。
一周が3kmになっていてがっくりだ。去年の一周7.8kmというコースだったらよかったが、あんなところでショートカットされたら面白くないだろ。去年のコースは登ったり降りたり曲がったりで面白いコースだったのにねー。180度転回ってなんじゃそりゃ。
ああ、勘違いKVM
KVM(Kernel based Virtual Machine)はFull Virtualizationができるのね。
勘違いしていた。でも自宅PCはAMD-Vじゃないから…。
2007年06月23日
Collective SVN report
2007-06-23
- r43946 Collage - Restructured rendering and content management engine to use the component architecture.
- r43983 reflex - filesystem reflector
- r44112 SmartPrintNG - added very basic Image support
- r44148 Booking Adding Booking for Plone 3 to branch
- r44157 reflex -> Reflecto
Plone SVN report
2007-06-23
- r15418 plone.transforms - Transformation registry and utilities.
新生銀行の認証方法
新生銀行の認証方法が変わったらしくて変な乱数表が送られてきた。
今さら乱数表かよ。キーロガーがしかけられるような環境では固定の乱数表なんか何の意味があるのかわからん。
2007年06月21日
Secure Matrix 雑感
CSEのSecure Matrixをちらっと見て、なんとなく疑問点。
2007年06月17日
lenny リリース予定日
Early September 2008
debian-devel-announceによると。結構のんびりしている気がするけど。こんなもんだっけ?
Plone SVN report
2007-06-17
- r15262 Define the new contentviews viewlet manager, and associated viewlets; also define footer and colophon viewlets.
- r15305 Made LinguaPlone aware, now it returns all translations.
- r15314 plone.app.viewletmanager merge #6649 tree
- r15354 plone.memoize - Use a md5 hash of the provided key in RAMCacheAdapter, reducing the memory footprint and speeding up lookup time.
Collective SVN report
2007-06-17
- r43428 quills.remoteblogging
- r43446 genesis model refactoring, renamed Mapping to Security
- r43159 ATAmazon for-plone-3-0
- genesisが進行中
- r43653 grouparchy First implementation of group based architecture
- r43900 SmartPrintNG - based on XSL-FO
- r43913 Quills Change to using interfaces from quills.core.
2007年06月09日
Collective SVN report
2007-06-09
- r43088 Quills - Remove ClassSecurityInfo stuff. It doesn't work now, and when security is fixed, it'll be done with ZCML allowed_interface declarations.
- r43103 roulationpolicy - item を folderに追加する場所を操作するらしい。
- r43232 plonegears
- r43332 genesis - MDAだったけ?
Plone SVN report
2007-06-09
- r15157 plone.app.cache Make new plone.app.cache package for configuration of zope.app.cache RAMCaches.
- r15159 portletをRAMCacheを利用するようにする
- r15190 tabをfolder以外も表示するように変更
genshi
Turbogearsでgenshiを使うぜと思ったが。
tg-admin quickstartのオプションで設定できないのかね? -t genshiとやっても駄目らしい。なんだろう…。
NetBSD-3.1 install
XenにNetBSD-3.1をインストールしてみる。
- http://www.netbsd.org/ にアクセス
- FTPなりBitTorrentsなり好きな方法でi386cd-3.1.isoをダウンロード。Torrentsのpeerが多かったのでびっくり。
- English選択
- キーボード選択
- MBRかentire diskか聞かれてentire diskにした。
- 適当にパーティションサイズを指定したけどそれでよかったのかね。
- crash…。もうちょっと考えます。Xenの問題なんだろうけど。
djangoでLDAP認証
djangoでLDAP認証する方法
Django's new authentication backends という記事もあるのだが、これではanonymousでできないのでちょっと改良。anonymousでbindしてdnを捜して、そのdnで認証するという手順。手順は普通の話。
import ldap
import ldap
from django.contrib.auth.models import User
# Constants
AUTH_LDAP_SERVER = '192.168.0.1'
class LDAPBackend:
def authenticate(self, username=None, password=None):
base = "ou=Users,dc=example,dc=jp"
scope = ldap.SCOPE_SUBTREE
filter = "(&(objectclass=person) (uid=%s))" % username
ret = ['dn']
# Authenticate the base user so we can search
try:
l = ldap.open(AUTH_LDAP_SERVER)
l.protocol_version = ldap.VERSION3
except ldap.LDAPError:
return None
try:
result_id = l.search(base, scope, filter, ret)
result_type, result_data = l.result(result_id, 0)
# print result_data
if (len(result_data) != 1):
return None
# Attempt to bind to the user's DN
l.simple_bind_s(result_data[0][0],password)
try:
user = User.objects.get(username__exact=username)
except:
# Theoretical backdoor could be input right here. We don't
# want that, so input an unused random password here.
# The reason this is a backdoor is because we create a
# User object for LDAP users so we can get permissions,
# however we -don't- want them able to login without
# going through LDAP with this user. So we effectively
# disable their non-LDAP login ability by setting it to a
# random password that is not given to them. In this way,
# static users that don't go through ldap can still login
# properly, and LDAP users still have a User object.
from random import choice
import string
temp_pass = ""
for i in range(8):
temp_pass = temp_pass + choice(string.letters)
user = User.objects.create_user(username,
username + '@example.jp',temp_pass)
user.is_staff = False
user.save()
# Success.
return user
except ldap.INVALID_CREDENTIALS:
# Name or password were bad. Fail.
return None
def get_user(self, user_id):
try:
return User.objects.get(pk=user_id)
except User.DoesNotExist:
return None
ほんのちょっとだけ変更してあります。
GPS携帯とGoogle Maps
AUの携帯からGPSのデータを送ってGoogle Mapsというのをやってみたけど。サンプルがおかしくねえか。というかほんとに携帯調べているのか?緯度・経度が度分秒で送られるので対応コードが必要だった。
- 参考 入門 Ajax
2007年06月03日
Collective SVN report
2007-06-02
- r42779 PFGPaymentField - an additional field to PloneFormGen for processing payments based on an amount provided by another field in the FormFolder.
- r42845 eXtremeManagement - Merge branches/mvr-annotations2.
- r42929 python-gettext Started new pure Python package for the Gettext related functionality found in PTS today
- r42950 Quills - Move the tag cloud functionality into a separate view.
- r42955 plonegear - a google gears experiment
- r42962 LatexTool - a Plone addon to create PDF output using the Latex software. 無茶やるのー。

