2012-01-01から1年間の記事一覧

.Net IoC Container Castle Windsor Ninject2

Python with SSL

Serversman上で遊んでいたら、いきなりurllib2::openでエラー。 "urlopen error unknown url type: https" この環境は標準のPythonが古すぎるので、buildして2.7.2を入れた経緯あり。 opensslは入ってるのに、なんでだ?と思っていたが、 下記情報で解決。 h…

Dovecot

Dovecotからメールを受信できないという状態が続く。 /sbin/service dovecot restart しても、dovecot自体の終了に失敗する。/usr/sbin/lsof -i :110 から既に起動しているdovecotをkill -9 pidにて無理やり殺し、Dovecotを再起動。 万事うまく行っているよ…

Find Command

find / -name

Python Code 04022012

python >>> i=0 >>> seq = ['one', 'two', 'three'] >>> for element in seq: seq[i] = '%d: %s' % (i, element) i+=1 冗長性を排除 [(lambda i, el: '%d: %s' % (i, el))(i, el) for i, el in enumerate(seq)]

Import Module at Runtime

pythondjangodjango/utils/importlib.py l.18 def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to r…

CentOS6でのお話 /etc/resolved.conf がnetwork service再起動後に毎回上書きされてしまうので /etc/sysconfig/network-scripts/ifcfg-xxx にDNS1=xxx.xxx.xxx.xxx DNS2=xxx.xxx.xxx.xxx としてDNSアドレスを登録。無事名前解決出きることを確認。 /etc/sysc…

BIND

備忘録: Configチェック: named-checkconf chrootしている場合は -t オプション Zoneチェック: named-checkzone