LeopardでGNU screenを使っているとき、以下のような エラーメッセージが出てくることがあるようです。
1 ****** Returning nil _server **********
これはLeopardに付属している/usr/bin/sに当たっているパッチの影響であるらしく、Macports版のGNU screenを使えばこの問題は発生しないようです。
LeopardでGNU screenを使っているとき、以下のような エラーメッセージが出てくることがあるようです。
1 ****** Returning nil _server **********
これはLeopardに付属している/usr/bin/sに当たっているパッチの影響であるらしく、Macports版のGNU screenを使えばこの問題は発生しないようです。
iPhone-2.1

おお。
See Also
Today, I added the feature mentioned in the title above to
the Gist Ubiquitifi
Obviously, it lacks title of the commands.
This spec came from our purpose of providing transparen
But it might be provided in the future.
DBにyyyy,mm,dayというカラムがあるのだがmm,dayがなぜかvarcharで発狂しそう。日付型か数値型に置き換えよう。PostgreSQL
詳細はこちら。
http://osb
to_number(year,9999) 10000 + to_number(month,99)100+to_num
のように使う。(日付型にした方が早かったか?
.autotestを書き換えるたびに思い出すのに苦労するのでまとめておきます。
| hook name | when does it happen? |
|---|---|
| :initializ | 起動直後 |
| :interrupt | INT割り込み発生時 |
| :reset | 初期化の後およびING割り込み時の初期化が完了した後 |
| :run_comma | テストの実行前 |
| :ran_comma | テスト完了時 |
| :all_good | INTによる全体テストが成功裏に完了した場合 |
| :waiting | テスト実行完了後にsleepする直前 |
| :quit | 終了時 |
I attended the event called OoO, which is an offline meeting for offline renderists
The contents of the event is as follows.
These were all attractive
I have a long standing issue.
The issue is if providing server-sid
And the 5 years went by...
The gang's all near.
IPアドレスのソートがちょっと面倒。
普通にRubyを使ってIPアドレスをソートしようとすると、
1 ip_addrs = ["192.100.100.1", "192.11.11. 1", "192.11.100 .1"] 2 ip_addrs.sort 3 #=> ["192.100.10 0.1", "192.11.100 .1", "192.11.11. 1"]
きちんとソートするためには、こんな感じにしてみる。
1 ip_addrs.sort_by{|a| a.split(".").map{|i| "%3d" % i.to_i}} 2 #=> ["192.11.11.1", "192.11.100 .1", "192.100.10 0.1"]
もうちょっと綺麗に書けんなぁ? "%3d"とか、なんか嫌やなぁ。
ちなみにシェルだと、
1 $ echo ' 2 192.100.100.1 3 192.11.11. 1 4 192.11.100 .1 5 ' | sort -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 -n 6 7 8 192.11.11. 1 9 192.11.100 .1 10 192.100.10 0.1
とかできるけど、-kオプションが気に入らない感じ。
もっと綺麗に書ける方法はないのだろうか・・・。
早速Growlとautotestを連携させてみようと思ったのですが、
growlnotif
1 % growlnotify -m "test" 2 2008-09-15 09:13:20.9 29 growlnotif y[901:10b] could not find local GrowlAppli cationBrid gePathway, falling back to NSDNC
こんな感じのWARNINGが出てきます。 メッセージ自体はきちんと表示されるので、実用上問題ないのですが、 毎回警告が出てくるのはちょっと気になるので、 警告が出ない方法が無いかいくつか試してみた所、 以下のようにホストを指定すると大丈夫なようでした。
1 % growlnotify -m "test" -H localhost
ということで、autotestと連携させるために、
以下のような.autotestファイルを作成しました。
1 class Autotest 2 module Growl 3 IMG_OK = '/Developer/Examples/ Carbon/Dia l/English. lproj/' + 4 'rotate_kno b_select.t iff' 5 IMG_NG = "/Applicati ons/Mail.a pp/Content s/Resource s/Caution. tiff" 6 class << self 7 def growl(title, msg, img = nil, pri = 0, sticky = "") 8 img ||= IMG_NG 9 msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}" 10 system "growlnotif y -n autotest #{title} -m #{msg.inspect}" + 11 " -H localhost --image #{img} -p #{pri} #{sticky}" 12 end 13 end 14 15 Autotest.add_hook :run_comman d do |at| 16 growl "autotest running", "Started", IMG_OK 17 end 18 19 Autotest.add_hook :ran_comman d do |at| 20 result = [at.results].flatten.join("\n") 21 examples = result.slice(/(\d+)\s+examples?/).to_i 22 tests = result.slice(/(\d+)\s+tests?/).to_i 23 failures = result.slice(/(\d+)\s+failures?/).to_i 24 errors = result.slice(/(\d+)\s+failures?/).to_i 25 if failures + errors > 0 26 growl "Tests Failed", 27 "#{failures} failures #{errors} errors", IMG_NG, 2#, "-s" 28 else 29 growl "Tests Passed", "#{tests + examples} tests", IMG_OK 30 end 31 end 32 end 33 end
最初はrequire 'autotest/gをしてモンキーパッチを当てていたのですが、
結局ほとんど書きかえてしまったのでこうなりました。
エラーが発生した場所や、エラーメッセージなんかも表示できるようになるともっと便利になるかもしれないですね。
Mac環境でうまく動いていない状況だったので、修正を行いました。
http://git
基本的な使い方の変更は特にありません。
複数の端末でTridentを起動しているときに、
'Trident.re
まだMacの起動スクリプトのことをなんと呼べばいいのかわからないのですが、
とりあえずなくて困ったので、
HyperEstra
hyperestra
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www .apple.com /DTDs/Prop ertyList-1 .0.dtd"> 3 <plist version="1.0"> 4 <dict> 5 <key>Debug</key> 6 <false/> 7 <key>Label</key> 8 <string>org.macpor ts.hyperes traier</string> 9 <key>OnDemand</key> 10 <false/> 11 <key>ProgramArg uments</key> 12 <array> 13 <string>/opt/local /bin/daemo ndo</string> <string>--label=hy perestraie r</string> 14 <string>--start-cm d</string> 15 <string>/opt/local /etc/Launc hDaemons/o rg.macport s.hyperest raier/hype restraier. wrapper</string> 16 <string>start</string> 17 <string>;</string> 18 <string>--stop-cmd </string> 19 <string>/opt/local /etc/Launc hDaemons/o rg.macport s.hyperest raier/hype restraier. wrapper</string> 20 <string>stop</string> 21 <string>;</string> 22 <string>--restart- cmd</string> 23 <string>/opt/local /etc/Launc hDaemons/o rg.macport s.hyperest raier/hype restraier. wrapper</string> 24 <string>restart</string> 25 <string>;</string> 26 <string>--pid=none </string> 27 </array> 28 <key>RunAtLoad</key> 29 <false/> 30 </dict> 31 </plist>
plistファイルの中で指定されているhyperestra
は以下の通り。
1 !/bin/sh 2 # 3 # MacPorts generated daemondo support script 4 # 5 6 # 7 # Init 8 # 9 prefix=/opt/local 10 11 # 12 # Start 13 # 14 Start() 15 { 16 if test ! "`netstat -a -n | grep 1978`"; then 17 rm -f /opt/local /var/run/h yperestrai er/_pid 18 fi 19 20 /opt/local /bin/estma ster start -bg /opt/local /var/run/h yperestrai er 21 } 22 23 # 24 # Stop 25 # 26 Stop() 27 { 28 /opt/local /bin/estma ster stop /opt/local /var/run/h yperestrai er 29 } 30 31 # 32 # Restart 33 # 34 Restart() 35 { 36 Stop 37 Start 38 } 39 40 # 41 # Run 42 # 43 Run() 44 { 45 case $1 in 46 start ) Start ;; 47 stop ) Stop ;; 48 restart) Restart ;; 49 * ) echo "$0: unknown argument: $1";; 50 esac 51 } 52 53 # 54 # Run a phase based on the selector 55 # 56 Run $1
macportsで入れたmysql5-dev