ネットワーク

プライベート

192.168.0.1

255.255.255.0

グローバル

219.117.237.232 - 219.117.237.239

255.255.255.248 / 29

DHCP

192.168.0.? - 192.168.0.?

Hostname Reading Private IP Global IP Memory Swap HDD OS Description
rooter
192.168.1.1 202.61.22.113



ルーター
komagata コマガタ 192.168.1.100




無線LANアクセスポイント
arial アリアル 192.168.1.101 219.117.237.234 8GB 512MB 8GB Debian Lenny Domain0
lucida, storage ルーシダ 192.168.1.102 219.117.237.235 512MB 256MB 1TB Debian Lenny ファイルサーバー、リポジトリ
courier クーリエ 192.168.1.103 219.117.237.236 6GB 3GB 500GB Debian Lenny ステージング、開発
verdana ベルダナ 192.168.1.104 219.117.237.237 512MB 256MB 100GB Debian Lenny BTS、ツール
helvetica ヘルベティカ 192.168.1.105 219.117.237.238




実家のサーバー(Debian lenny)にRemedie入れたら、動いたんだけどOPMLインポートしてアクセスすると落ちる。

動いてるヤツのremedie.db持ってこようかな?

$ perl bin/remedie-server.pl 
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
HTTP::Engine::Interface::AnyEvent : You can connect to your server at http://0.0.0.0:10010/
We won't be doing any rendezvous publishing, please install a Net::Rendezvous::Publish::Backend:: module
We won't be doing any rendezvous publishing, please install a Net::Rendezvous::Publish::Backend:: module
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
"unicode" attribute will be deprecated. Use "sqlite_unicode" instead. at /usr/local/lib/perl/5.10.0/DBI.pm line 708.
Malformed UTF-8 character (fatal) at /usr/local/lib/perl/5.10.0/XML/LibXML/Error.pm line 217. at /usr/local/share/perl/5.10.0/HTML/TreeBuilder/LibXML.pm line 59
[Perl] Google Web Search API検索処理サンプル Kawa.netブログ(川崎有亮)/ウェブリブログ

Google Web Search API のサンプルコードもメモしておく。
Perlの場合は、SOAP::Liteモジュールを使うのがカンタン。
『link:www.kawa.net』 のリンク元検索をはじめ、特殊な検索も可能。

(中略)(以下コメント欄)

SOAP::Liteモジュールの保存場所など設定の詳細がさっぱりわからないです。どうしても、このサンプルを実行できないです…
何か、保存場所が決まっていたりしていますか?

ゆうすけさんがここにお示しになっているサンプルを改良すればどうにかなると思ったのですが、なにぶんGoogle Web Search API の詳細がわからない&期限が迫っているという状況で、もう困り果てています。よりによって、ゆうすけさんがお示しになっているサンプルすら実行できないですから…

よろしければ、以下のメールアドレスにGoogle Web Search API によって取得した検索結果の「上位100件取得」「それぞれ100文字取得」をテキストデータとして取得するということを達成するプログラムのサンプルを示してくださるとありがたいですが…もう切羽詰ってます…

dinamo_moskvaあっとhotmail.com
あっとは勿論@に直してください。

よろしくお願い申し上げます。頼りにしてます…

勉強中の人
2006/08/21 09:55


サンプルスクリプトのソースコード中の『->』は『->』です。
たぶん、このブログのシステムの関係で化けてしまってますね。

コマンドラインから
『perl -MSOAP::Lite -e "print($SOAP::Lite::VERSION)"』
を実行してみた結果はいかがでしょうか?

また、SOAP-Lite-0.69.tar.gzをダウンロードした場合は、
libディレクトリ内のすべてのサブディレクトリ(SOAPなど)を
上記Perlスクリプトと同じディレクトリ(カレント)に置けば、 バージョン0.69を利用することができます。

どのようなエラーが表示されるのでしょうか。
それとも、何も表示されない?
サマリ(おおむね先頭100文字相当)は $item->{snippet} で取り出せるので
そんなに難しくないと思います。がんばってください。

ゆうすけ
2006/08/21 12:42

川崎ゆうすけさんは神か仏かゴータマ・シッダールタか。(重複)

兄貴ぃ(川崎さん)!俺にやらせてつかあさいっ!俺が必ずヤツのタマ取ったりますけん!

% wget "http://localhost:10010/rpc/collection/opml" -O remedie.opml

便利ー。sqlite3だからremedie.dbを直接コピーでもいいかも。

参照:コマンドラインでRemedieのRPC叩いて登録チャンネルリストをOPMLファイルに取っておく - otsune's SnakeOil - subtech

tridentをGem化してリリースしました - Hello, world! - s21g

tridentは、 tail -f log/development.logと autotest、script/console を一枚の端末上で同時に実行するRailsプラグインでした(trident: tail -f, autotest and script/console at once参照)

便利すぐる。使わない人には宗教上の理由が必要ですね?

% trident
Rendered cemeteries/_cemetery (0.00263)
Rendered shared/_page_header (0.00083)
Rendered shared/_header_other (0.00068)
Prefecture Load (0.000395) SELECT * FROM `prefectures` WHERE (`prefectures`.`id` IN (10,11,12,13,14,19,22,23,26,27,28,29))
CACHE (0.000000) SELECT * FROM `costs`
Character Load (0.000364) SELECT * FROM `characters`
Character Columns (0.001453) SHOW FIELDS FROM `characters`
Rendered cemeteries/_finder (0.01049)
Rendered shared/_page_footer (0.00073)
Completed in 0.19417 (5 reqs/sec) | Rendering: 0.12335 (63%) | DB: 0.02105 (10%) | 200 OK [http://tsuisumi/cemeteries]
Loading development environment (Rails 2.0.2)
loading autotest/rails_rspec
./vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb:17: warning: method redefined; discarding old group_by
./vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb:8: warning: discarding old start_with?
./vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb:9: warning: discarding old end_with?
SQL (0.000168) SET NAMES 'utf8'
SQL (0.000089) SET SQL_AUTO_IS_NULL=0
SQL (0.097719) SELECT version FROM schema_info
>> Cemetery.find(1).name
Cemetery Columns (0.028357) SHOW FIELDS FROM `cemeteries`
Cemetery Load (0.000333) SELECT * FROM `cemeteries` WHERE (`cemeteries`.`id` = 1)
=> "駒形霊園"

Railsで都道府県のfixtureをcsvで作ってあったんだけどymlにしたかったのでpythonの勉強のためにpythonで書いてみた。

#!/usr/bin/env python
import sys
import csv

if (len(sys.argv) < 2):
print 'Usage: %s ' % sys.argv[0]
quit()

csv_file = sys.argv[1]

filename, suffix = csv_file.split('.')
reader = csv.reader(file(csv_file, 'r'))

i = -1
res = []
for row in reader:
i += 1
if i == 0:
column = row
continue

s = filename + str(i) + ":\n"
for j in range(len(column)):
s += " " + column[j] + ": " + row[j] + "\n"
res.append(s)

f = open(filename + ".yml", 'w')
f.write("\n".join(res))
f.close()

基本的な構文もわかってないので時間がかかりました。ただ、quickrun.vimを入れたら¥rで即座に実行してくれるので、「こんな感じかな?」と気軽に実行できるのが便利でした。

糞ダサイコードになってると思うのでどなたか添削いただければ幸いです・・・。

一番知りたかった事

このブログ更新したらエラーが。

SQLite3::BusyException (database is locked):

timeoutをどんだけ増やしてもダメ。

% sqlite3 production.sqlite3 vacuum
SQL error: disk I/O error

passengerが掴んでるのか知らんけど、ロックしてるプロセスはどうやって探せば良いんだろう?

% cp production.sqlite3 foo
% rm -f production.sqlite3
% mv foo production.sqlite3

とりあえずコピーして削除したらロック消えた・・・。

% stat -c '%s' production.sqlite3
2905088
% sqlite3 production.sqlite3 vacuum
% sqlite3 production.sqlite3 reindex
% stat -c '%s' production.sqlite3
2865152

ついでにvacuumしたけどあんまりサイズ減らないなあ・・・。

「クラウドって何?」

と聞かれてすっぱり答えられなかったので自分でも良く理解してないんだろうということで調べてまとめてみる。(絵を描いたり文章にしないと理解できない残念な頭になっている・・・)

クラウドとは

ビジネス的にはクラウド(大体はクラウドコンピューティングの意味で使われる)とはソフトを自分のPCにインストールするのではなく、Gmailみたいにインターネット上のサービスを使うコンピューターの利用形態のこと。

技術的にはクラウド(大体はクラウドコンピューターの意味で使われる)とは仮想化技術や大規模分散技術のこと。

メリット

  • コスト安
  • どこからでも同じデータにアクセスできる利便性

デメリット

  • カスタマイズ性が低い
  • UIがヘボイ
  • 遅い

Google App Engine入門:実行効率を犠牲にせずに開発効率だけを上げるテクニック

memoize (デコレータ)

これはPythonを使う人たちの間では良く使われるデコレータのパターンで、関数の戻り値をクロージャを使ってキャッシュすることにより、実行効率を上げる仕組みである。Google App Engineの場合、サーバーが一度メモリーにロードしたモジュールは、アプリへのアクセスが途絶えてアプリそのものがサーバーから追い出されない限りはメモリーに常駐していてくれるので、memoizeとはとても相性が良い。

kwargs(デコレータ)

これは、HTTPリクエストをプロセスするRequestHandlerのメソッドを実装する際に、getやpostに渡されたパラメータを、関数へのnamed argumentとして渡された形でのコーディングを可能にするデコレータである。

イイね!イイね!(何様だ > 俺)

めもいずって糞面倒臭いイメージがあったんだけどデコレータでこんなにシンプルに実装できるんですね!

こういう、"大きな仕事はしないけど、ちょっと便利にしてくれて、マイナス面はほとんど無くて、嫌なら別に使わなくても問題無い"みたいな、プログラムに幸せだけを振り掛けてくれるような、きざみパセリみたいなモジュールとても好きです。(最近のRubyだと"g"みたいな)