|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||
% cat test.rd =begin html hello world. =end % rd2 --with-part=html test.rd Error: file empty.
% cat test.rb require 'optparse' ARGV.options do |q| q.on("--with-part=PART", /(\w+)(?:\s*:\s*(\w+))?/) do |src, part, filter| p src, part, filter end end ARGV.parse!
% ruby1.6 test.rb --with-part=html "html" "html" nil % ruby1.8 test.rb --with-part=html ["html", "html", nil] nil nilのように、handler への引数が 1.6/1.8 で違っています。
% dpkg -S /usr/lib/ruby/1.8/optparse.rb libruby1.8: /usr/lib/ruby/1.8/optparse.rb % dpkg -S /usr/lib/ruby/1.6/optparse.rb liboptparse-ruby: /usr/lib/ruby/1.6/optparse.rb
% dpkg -l ruby liboptparse-ruby Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii ruby 1.8.0-1 An interpreter of object-oriented scripting ii liboptparse-ru 0.8.4-1 A command line option parser class for Ruby.
% diff -u rd2.old rd2 --- rd2.old 2003-10-10 17:09:42.000000000 +0900 +++ rd2 2003-10-10 17:09:53.000000000 +0900 @@ -125,6 +125,8 @@ q.on("--with-part=PART", /(\w+)(?:\s*:\s*(\w+))?/, "include PART with Filter") do |src, part, filter| + src, part, filter = *src + with_part.push([part, filter || part]) unless include_path.index(RD::RDTree.tmp_dir) include_path.push(RD::RDTree.tmp_dir)
日記URLの最後に「rss」と付けていただくことで、 RSSファイルの取得ページにアクセスできます。 例:http://d.hatena.ne.jp/hatenadiary/rss
<?php $fp = @fopen("access.log","a") or die("Sorry."); $str = sprintf("%s %s\n", getenv("HTTP_REFERER") , getenv("HTTP_USER_AGENT")); fputs($fp, $str); fclose($fp); ?>*1 という script で HTTP_REFERER を収集するようにしておいた。
% cat test.rb ARGV.options do |q| q.on("--with-part=PART", /(\w+)(?:\s*:\s*(\w+))?/) do |src, part, filter| p src, part, filter end end ARGV.parse!
% ruby1.6 -r optparse-0.12/optparse.rb test.rb --with-part=html "html" "html" nil % ruby1.8 -r optparse-0.12/optparse.rb test.rb --with-part=html ./optparse-0.12/optparse.rb:1001: warning: character class has `]' without escape ./optparse-0.12/optparse.rb:1001: warning: character class has `[' without escape ./optparse-0.12/optparse.rb:1011: warning: character class has `]' without escape ./optparse-0.12/optparse.rb:1011: warning: character class has `[' without escape ./optparse-0.12/optparse.rb:1023: warning: character class has `]' without escape ./optparse-0.12/optparse.rb:1023: warning: character class has `[' without escape ["html", "html", nil] nil nilruby1.8 付属の optparse.rb も確認してみました。
% ruby1.8 -r optparse.rb test.rb --with-part=html ["html", "html", nil] nil nil
% cat test.pl #!/usr/bin/env perl use URI; $uri = URI->new("http://www.monochrome.jp/~katsuwo/diary/?20031010#foobar"); print $uri->path_query . "\n"; % ./test.pl /~katsuwo/diary/?20031010
% cat test.rb #!/usr/bin/env ruby require 'uri' uri = URI.parse("http://www.monochrome.jp/~katsuwo/diary/?20031010#foobar"); print uri.path_query + "\n"; % ./test.rb ./test.rb:6: private method `path_query' called for #<URI::HTTP:0x402c9e8c> (NoM ethodError)
-A, --add-keep PKG1...PKGn Add packages to the list of packages which are never to be reported, regardless of their state. You may specify '-' to use standard input. Note that package names are case-sensitive.なんていう機能が存在するようです。
apt-get remove `deborphan --guess-all`なんてのを crontab に突っ込んでも良さそうです。
% ping -c10 www.gimlay.org PING ns1.gimlay.org (61.205.198.170): 56 data bytes --- ns1.gimlay.org ping statistics --- 10 packets transmitted, 0 packets received, 100% packet lossちなみに、研究室からはばっちり:)
ping -c3 www.gimlay.org PING ns1.gimlay.org (61.205.195.154): 56 data bytes 64 bytes from 61.205.195.154: icmp_seq=0 ttl=236 time=56.9 ms 64 bytes from 61.205.195.154: icmp_seq=1 ttl=236 time=61.4 ms 64 bytes from 61.205.195.154: icmp_seq=2 ttl=236 time=50.5 ms --- ns1.gimlay.org ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 50.5/56.2/61.4 msうーむ。参ったなぁ…。
<Directory /home/*/public_html>という指定に引っかからず、cgi-script として認識されていないというものでした。
apt-cache show librdf-ruby Package: librdf-ruby Priority: optional Section: interpreters Installed-Size: 188 Maintainer: Dave Beckett <Dave.Beckett@bristol.ac.uk> Architecture: i386 Source: redland Version: 0.9.13-4 Depends: libc6 (>= 2.3.2-1), libcurl2 (>= 7.10.7-1), libdb3 (>= 3.2.9-19), libgl ib2.0-0 (>= 2.2.3), libraptor0, librdf0, libruby1.8 (>= 1.8.0-2), libssl0.9.7, l ibxml2 (>= 2.5.7-1), zlib1g (>= 1:1.1.4), ruby1.8 Filename: pool/main/r/redland/librdf-ruby_0.9.13-4_i386.deb Size: 97778 MD5sum: b17f388bb6746abccdfd2290b8578239 Description: Ruby 1.8 bindings for the Redland RDF library This package contains the files needed to use libxml2 in Ruby 1.8 programs.ちょっと調べてみたのだけど、api が使いづらくてかなり不便な感じです。
% fakeroot debian/rules binary # Add here commands to compile the arch part of the package. #/usr/bin/make touch build-arch-stamp dh_testdir dh_testroot dh_clean -k -s dh_clean: I have no package to build make: *** [install-arch] Error 1
Oct 20 23:56:41 evergreen kernel: NETDEV WATCHDOG: eth0: transmit timed out Oct 20 23:56:41 evergreen kernel: eth0: Transmit timed out, status fc665410, CSR12 00000000, resetting... Oct 20 23:56:49 evergreen kernel: NETDEV WATCHDOG: eth0: transmit timed out Oct 20 23:56:49 evergreen kernel: eth0: Transmit timed out, status fc665410, CSR12 00000000, resetting... Oct 20 23:57:25 evergreen kernel: NETDEV WATCHDOG: eth0: transmit timed out Oct 20 23:57:25 evergreen kernel: eth0: Transmit timed out, status fc665410, CSR12 00000000, resetting...
binary: binary_arch binary_indepという行を
binary: binary_indepとして architecture depended binaries を作らないようにすると問題ないようです。
dh_clean -k -sとしていると
dh_clean: I have no package to buildなんてメッセージを出すのでしょうね。
Unfortunately, the current CVS version Ming is not supported by Ruby/Ming because some interfaces are changed from Ming ver 0.2a. We need new codes to support future CVS versions.stable にも 0.2a は入っていないようなので、結構手間かもしれません…。
% exerb.rb /usr/bin/exerb.rb:9:in `require': No such file to load -- exerb/exerb (LoadError) from /usr/bin/exerb.rb:9というエラーを出してしまうようです。
% dpkg -L exerb | grep exerb/exerb /usr/lib/ruby/1.6/exerb/exerb.rbさて、どうしたもんですかねぇ。
% make -C src/actioncompiler/ make: Entering directory `/home/katsuwo/work/dpkg/tmp/ming-0.2a/src/actioncompiler' gcc -g -Wall -c -o compile.o compile.c gcc -g -Wall -c -o listaction.o listaction.c flex -i -Pswf4 swf4compiler.flex gcc -g -Wall -c -o lex.swf4.o lex.swf4.c swf4compiler.flex: In function `comment': swf4compiler.flex:288: error: `yytext_ptr' undeclared (first use in this function) swf4compiler.flex:288: error: (Each undeclared identifier is reported only once swf4compiler.flex:288: error: for each function it appears in.) make: *** [lex.swf4.o] Error 1 make: Leaving directory `/home/katsuwo/work/dpkg/tmp/ming-0.2a/src/actioncompiler'なにが悪いのかわかなかったのですが debian-users で その答えを見つけました 。
% wget http://www.monochrome.jp/~katsuwo/debian/dists/unstable/binary-i386/libming/libming_0.2a-1_i386.deb % dpkg -i libming_0.2a-1_i386.deb
Conflicts: libmingしておけば ok かも:)
% apt-cache search doc-rfc doc-rfc - Migration Pseudo-Package doc-rfc-0001-0999 - Other RFCs doc-rfc-1000-1999 - Other RFCs doc-rfc-2000-2999 - Other RFCs doc-rfc-3000-3999 - Other RFCs doc-rfc-experimental - Experimental RFCs doc-rfc-fyi-bcp - FYI and BCP RFCs doc-rfc-misc - Miscellaneous RFCs doc-rfc-old-std - Old Standard RFCs doc-rfc-std - Standard RFCs doc-rfc-std-proposed - Proposed Standard RFCs
% apt-cache show doc-rfc Package: doc-rfc Priority: optional Section: non-free/doc Installed-Size: 40 Maintainer: Kai Henningsen <kai@debian.org> Architecture: all Version: 20030621-1 Replaces: doc-rfc-std (<< 20030621-1), doc-rfc-fyi-bcp (<< 20030621-1), doc-rfc- experimental (<< 20030621-1), doc-rfc-std-proposed (<< 20030621-1), doc-rfc-misc (<< 20030621-1), doc-rfc-old-std (<< 20030621-1), doc-rfc-0001-0999 (<< 2003062 1-1), doc-rfc-1000-1999 (<< 20030621-1), doc-rfc-2000-2999 (<< 20030621-1), doc- rfc-3000-3999 (<< 20030621-1) Depends: doc-rfc-std, doc-rfc-std-proposed, doc-rfc-fyi-bcp, doc-rfc-misc, doc-r fc-old-std Filename: pool/non-free/d/doc-rfc/doc-rfc_20030621-1_all.deb Size: 6248 MD5sum: 8019f93a5815fd497a37f7084d2178c7 Description: Migration Pseudo-Package This package pulls in some of the new doc-rfc-xxx packages (those that most closely correspond to the old doc-rfc package) . It is otherwise useless and can be removed.
% pwd /tmp/pdumpfs % find . ./abc ./abc/def ./abc/def/ghiこれを pdumpfs を使って backup してみます。(このとき --exclude tmp とします)
% find /tmp/backup/ /tmp/backup/ % pdumpfs --exclude tmp abc/ /tmp/backup/ % find /tmp/backup/ /tmp/backup/ /tmp/backup/2003 /tmp/backup/2003/10 /tmp/backup/2003/10/29 /tmp/backup/2003/10/29/abc /tmp/backup/2003/10/29/abc/def /tmp/backup/2003/10/29/abc/def/ghi
% find /tmp/backup/ /tmp/backup/ % pdumpfs --exclude tmp /tmp/pdumpfs/abc/ /tmp/backup/ % find /tmp/backup/ /tmp/backup/ /tmp/backup/2003 /tmp/backup/2003/10 /tmp/backup/2003/10/29 /tmp/backup/2003/10/29/abc
% pdumpfs --exclude .java src/ dest/としたときに
% find . ./abc ./abc/def ./abc/def/ghiという構成のときに match に使用する文字列は