UtilityPrograms

2006-06-06 11:56:34 +0900 (6536d); rev 17

よく使うツールについてのメモ。

NadokaBot

bot_initialize
on_privmsg prefix, ch, msg
on_join prefix, ch
@state.channel_users ch

send_notice(ch, "Yes, #{prefix.nick}!"

send_msg Cmd.invite(nick, ch)

send_msg Cmd.kick(ch, nick, msg)

IrcDaemon

apt-get install ircd-ircu

したらそれだけで ircd が立った。

ircd.conf読解講座
http://www.tokio.ne.jp/~rankuma/ircdconf.html
znz さんのメモ
http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=ircd-ircu

Debian

時間(時計)の設定。(↓どこのサーバーかわからないけど)

ntpdate -d 209.144.20.76

http://www.namazu.org/~tsuchiya/debian/

debian で rails を使う設定。

http://mikilab.doshisha.ac.jp/dia/research/report/2005/0811/001/report20050811001.html

の手順で

apt-get install rails/unstable

したらインストールできた。

apt-get install libmysql-ruby

も実行しておいた。(↑これは不要っぽい)

/etc/apt/sources.list

#deb http://ftp2.jp.debian.org/debian/ sarge main

deb http://ftp2.jp.debian.org/debian/ stable main
deb-src http://ftp2.jp.debian.org/debian/ stable main

deb http://security.debian.org/ stable/updates main

deb http://ftp.jp.debian.org/debian/ unstable main non-free contrib

rcconf 便利

http://wota.jp/ac/?date=20051113#p04

CUIで起動するデーモンをON/OFFできる。

Gentoo

日本語化。をみてやったがいまいちよくわかってない。

vi /etc/make.conf

USE に cjk を追加。

emerge -uD --newuse world

.zshrc に以下を追加。

LANG="ja_JP.eucJP"
export LANG

emerge -u でエラー

!!! ERROR: dev-db/mysql-4.1.14 failed.
!!! Function pkg_setup, Line 123, Exitcode 0
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

わかってないが以下で解決した。

emerge --resume --skipfirst

参考: http://www.gentooforum.de/thread.php?threadid=7693

Subversion

リポジトリをファイルにする場合

svnadmin create /home/dan/2005/0609/jewel-prot

svn mkdir -m "import" file:///home/dan/2005/0609/jewel-prot/trunk
svn mkdir -m "import" file:///home/dan/2005/0609/jewel-prot/branches
svn mkdir -m "import" file:///home/dan/2005/0609/jewel-prot/tags

インポート

svn import -m "" jewel-prot file:///home/dan/2005/0609/jewel-prot/trunk

チェックアウト

svn co file:///home/dan/2005/0609/svnrepos/trunk jewel-prot-trunk

mod_dav_svn を使う場合

mkdir /var/svn
svnadmin create /var/svn/reps

ActiveRecord

もっといい書き方がないだろうか。

doll.temp_states.find_all("state = 'action_wait'").each{|s|s.destroy}

samba の設定

パスワードは Windows と同じにしておく。

smbpasswd -a dan

設定は簡単に。

nano /etc/samba/smb.conf

で smb.conf を編集。

[global]

# 1. Server Naming Options:
# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = gp6

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in the samba docs for details
;   vfs object = /usr/lib/samba/vfs/recycle.so

起動させる。

/etc/init.d/samba start
rc-update add samba default

system revision 1.162