2011年5月18日水曜日

[Linux] パス(/usr/local/lib)を追加

/etc/ld.so.conf に /usr/local/lib を追加

# /sbin/ldconfig

[Linux] apacheを自動起動

# chkconfig httpd on

確認するには
# chkconfig --list

2011年2月26日土曜日

[Django] Model/select_related()

自動的に外部キーのリレーションを追跡し、クエリの実行時にリレーション先のオブジェクトも加えて選択するようなQuerySetを返す

e = Entry.objects.select_related().get(id=5)

2011年2月16日水曜日

[Apache] Digest認証

# htdigest -c /etc/httpd/.htdigest 'Secret Zone' secret

<directory "/hoge/poge">
AuthType Digest
AuthName "My Server"
AuthDigestDomain /poge/
AuthUserFile /etc/httpd/.htdigest
Require user secret
</Directory>

[JavaScript] const

const はIEでは使えない。

2010年11月25日木曜日

[Linux] 行数をカウントする

$ wc hoge.txt

3 38 286
行数 単語数 ファイルサイズ

[Linux] CPU、メモリの情報を見る

cat /proc/cpuinfo
cat /proc/meminfo