2011/01/07

Capistrano Installation notes

https://github.com/capistrano/capistrano/wiki/2.x-Getting-Started

最近 Rubyを覚えたついでに簡単な Deploy Script を書いてみるようになった。
以下、Debian Lenny でのインストールノート。

# aptitude install rubygems
# gem sources -a http://gems.github.com/
# gem -v

-- バージョンが 1.2.0 なので 1.4 以降に rubygems をアップデートする --
-- ここは Debian 特有の手順が必要 --

# gem install rubygems-update
# /var/lib/gems/1.8/bin/update_rubygems

-- Capistrano のインストール --

# aptitude install libopenssl-ruby
# gem install capistrano

-- インストール完了 --

# cap
Please specify at least one action to execute.
Usage: cap [options] action ...
-d, --debug Prompts before each remote command execution.
-e, --explain TASK Displays help (if available) for the task.
-F, --default-config Always use default config, even with -f.
-f, --file FILE A recipe file to load. May be given more than once.
-H, --long-help Explain these options and environment variables.
-h, --help Display this help message.
-l [STDERR|STDOUT|file] Choose logger method. STDERR used by default.
--logger
-n, --dry-run Prints out commands without running them.
-p, --password Immediately prompt for the password.
-q, --quiet Make the output as quiet as possible.
-r, --preserve-roles Preserve task roles
-S, --set-before NAME=VALUE Set a variable before the recipes are loaded.
-s, --set NAME=VALUE Set a variable after the recipes are loaded.
-T, --tasks [PATTERN] List all tasks (matching optional PATTERN) in the loaded recipe files.
-t, --tool Abbreviates the output of -T for tool integration.
-V, --version Display the Capistrano version, and exit.
-v, --verbose Be more verbose. May be given more than once.
-X, --skip-system-config Don't load the system config file (capistrano.conf)
-x, --skip-user-config Don't load the user config file (.caprc)

2010/11/12

marriage party welcome speech

http://www.youtube.com/watch?v=pj2WS_vZJoY

----

話をしよう。
彼女と最初に出会ったのは今から9年・・・
いや、10年前だったか・・・まあいい。
私にとってはつい昨日の出来事だが。

彼女には72通りの名前があるから
なんて呼べば良いのか・・・
たしか最初に会ったときは・・・「(新婦の名前)」

まあ、良いヤツだよ。

そんなウェディングドレスで大丈夫か?
(新婦)一番いいのを頼む

人が持つ唯一絶対の力――
――それは自らの意思で進むべき道を選択することだ。
お前は常に人にとって最良の未来を思い、自由に選択していけ。

(新婦の名前)よ、さあ、行こう。

----

ということで、明日結婚式と披露宴です。
上記は披露宴のウェルカムスピーチとなる予定でしたが、相方に殴られて敢え無くボツになりました。
皆様、私と相方を末永く宜しくお願いします m(_ _)m

2010/11/11

introspection(2)

どこに行っても焼け野原でそれなりに苦労するなら、自分を一番強く描ける場所を選ぶべきである。そうできるかを確かめるために自分を表現し、自分をぶつける毎日。けど今日は消化不良だったかも。リカバー可能ではあるが(一行独白

2010/11/09

/etc/cron.daily/tmpwatch

Red Hat系ディストリビューション限定の話だが、/tmp ディレクトリに削除されては困るファイルを放置してはいけない。10日アクセスがないと削除されるのに全く気付いてないぬるぽな人は割といるかもしれない、、と推測してこのエントリを記す。

flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 720 "$d"
fi
done

上記は CentOS 5.4(final) の /etc/cron.daily/tmpwatch の中身だが、/tmp からは一部のソケットファイルを除いて10日間アクセスがないものを削除している。その他 /var/tmp/ は30日。/var/ 以下の一部のディレクトリも同様である。

----

詳しくは man 8 tmpwatch であるが、一定時間アクセスがないものを削除、というのは割と使えるかもしれない。キャッシュファイルとか、ね。

2010/11/02

introspection

いや、ほんと内省は他に自分を伝える時の基本ですよね。と今更ながらに実感する今日この頃(一行独白