Archive for 11月, 2007
シェルスクリプトでディレクトリ以下のファイル中の文字列を一括置換
金曜日, 11月 16th, 2007FreeBSD 4.11 用に mplayer のソースコードの中の stdint.h を inttypes.h に書き換えたかった。
[O] sedとgrepで、あるディレクトリ以下のファイル中の文字列を一括置換
grep -lr stdint.h * | grep -v '.svn/'| grep -v 'configure.log'| xargs sed -i 's/'stdint.h'/'inttypes.h'/g'
ありゃエラーが
sed: 1: “dvdread/nav_print.c”: extra characters at the end of d command
ではこれを参考に
grep -lr stdint.h * | grep -v '.svn/'| grep -v 'configure.log'| xargs perl -pi -e 's/stdint\.h/inttypes\.h/g'
こんなのもあり
MacWiki - コマンド/say
金曜日, 11月 16th, 2007
for x in `ls -l /System/Library/Speech/Voices/ |awk '{print $9}'|xargs basename -s .SpeechVoice`; do echo $x says && say -v $x hello world > /dev/null; done
Google Calendar Mobile Gateway
金曜日, 11月 16th, 2007Google Calendar Mobile Gateway
便利。
登録が簡単なのもいい。
perlsh を OSX にインストール
水曜日, 11月 14th, 2007 perlsh を OSX 10.3 + PPC 環境にインストール - あーありがち 2007-08-11
のまんま
1. cpan から install Term::ReadLine::Gnu
2. OSX 10.3 + PPC 環境では readline.h が見つからずに compile 失敗
3. 手元に Fink で入れた Readline があったので、それを使って compile
4. perlsh スクリプトを PATH の通ったところへ install3 では
~/.cpan/build/Term-ReadLine-Gnu-1.16
に入って
perl Makefile.PL –prefix=/sw
make
sudo make installFink じゃない人は /opt とか適当に書き換えるよろし。
4 では
cd eg
sudo install -m 0755 perlsh /usr/local/binあと。perlsh は
#! /usr/local/bin/perl
になっているので、これを自分の使っている Perl インタープリタのパスに書き換えてやる必要あり。
ledit と rlwrap
水曜日, 11月 14th, 2007gosh のインライン編集に rlwrap が便利って書いたけど
leditってのもあるそう。
これは Mac だと fink に入っているのでらくちん。
sudo fink install ledit
一緒に OCaml もついてきてしまうが。
ledit gosh -i
Mac で使えるウェブカム使えないウェブカム
水曜日, 11月 14th, 2007VGA Single Chip:
Vendor Name: Pixart Imaging Inc.
Speed: Up to 12 Mb/sec
Product ID: 9728 ($2600)
Bus Power (mA): 500Status: Connected to PixArt PAC7311 based camera
な
ELECOM UCAM-P1S30MWH
を買ってしまい、macam でも動かなかったのですが、
CVSの最新版で動くようになりました。
cvs-build 2007-10-17 だと画面が逆さまになってしまうので
Discussion Forums: Open Discussion
Philips SPC 610NC
By commenting out line 91
// orientation = Rotate180;
in /macam/cameras/PAC7311Driver.m , and build from CVS
flipping is gone.I tested on
ELECOM UCAM-P1S30MWH
which use the same PAC7311 chip as Philips SPC 610NC,
OSX 10.3.9 and 10.4.10.
して、CVSからビルドしてください。