<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/ME2.2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>forever 5 years old blog</title>
	<link>http://www.forever5yearsold.net</link>
	<description>今年も 5 歳になりました</description>
	<pubDate>Sun, 19 Oct 2008 02:48:53 +0900</pubDate>
	<generator>http://wordpress.org/?v=ME2.2.3</generator>
	<language>ja</language>
			<item>
		<title>ReFe を CarbonEmacs から使ってみる</title>
		<link>http://www.forever5yearsold.net/archives/110</link>
		<comments>http://www.forever5yearsold.net/archives/110#comments</comments>
		<pubDate>Sun, 19 Oct 2008 02:48:53 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Emacs]]></category>

		<category><![CDATA[プログラミング]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/110</guid>
		<description><![CDATA[Ruby のリファレンスマニュアル検索ツール ReFe を CarbonEmacs から使ってみます。
ReFe はもう古いとのことですが、まだまだ右も左もわからないのでやってみたメモ。
まずはこんな感じで rb-rubygems をインストール。


[Masahiro@bilbao.local:~] $ sudo port -d install rb-rubygems


gem で refe をインストール。


[Masahiro@bilbao.local:~] $ sudo gem install refe


ReFe - Rubyリファレンスマニュアルにある通り refe.el を取ってきて ~/.elisp 以下等、自分の Emacs Lisp ライブラリの置き場所に置く、と思ったらないので Wayback Machine からもらってきます。~/.elisp は load-path に追加しておかないといけないですぜ。


[Masahiro@bilbao.local:~] $ .elisp
[Masahiro@bilbao.local:~/.elisp] $ wget http://web.archive.org/web/20070622060720/http://ns103.net/~arai/ruby/refe.el


バイトコンパイルしておきます。


[Masahiro@bilbao.local:~/.elisp] $ /Applications/Emacs.app/Contents/MacOS/Emacs -batch -f batch-byte-compile refe.el


で、.emacs に以下を追加。


(require 'refe)
;; F1 で refe を実行する
(add-hook [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby のリファレンスマニュアル検索ツール ReFe を CarbonEmacs から使ってみます。<br />
<a href="http://d.hatena.ne.jp/rubikitch/20071228/rubyrefm">ReFe はもう古い</a>とのことですが、まだまだ右も左もわからないのでやってみたメモ。</p>
<p>まずはこんな感じで rb-rubygems をインストール。</p>
<pre>
<code>
[Masahiro@bilbao.local:~] $ sudo port -d install rb-rubygems
</code>
</pre>
<p>gem で refe をインストール。</p>
<pre>
<code>
[Masahiro@bilbao.local:~] $ sudo gem install refe
</code>
</pre>
<p><a href="http://www.ruby-lang.org/ja/man/html/ReFe.html">ReFe - Rubyリファレンスマニュアル</a>にある通り refe.el を取ってきて ~/.elisp 以下等、自分の Emacs Lisp ライブラリの置き場所に置く、と思ったらないので Wayback Machine からもらってきます。~/.elisp は load-path に追加しておかないといけないですぜ。</p>
<pre>
<code>
[Masahiro@bilbao.local:~] $ .elisp
[Masahiro@bilbao.local:~/.elisp] $ wget http://web.archive.org/web/20070622060720/http://ns103.net/~arai/ruby/refe.el
</code>
</pre>
<p>バイトコンパイルしておきます。</p>
<pre>
<code>
[Masahiro@bilbao.local:~/.elisp] $ /Applications/Emacs.app/Contents/MacOS/Emacs -batch -f batch-byte-compile refe.el
</code>
</pre>
<p>で、.emacs に以下を追加。</p>
<pre>
<code>
(require 'refe)
;; F1 で refe を実行する
(add-hook 'ruby-mode-hook
          '(lambda ()
             (define-key ruby-mode-map [f1] 'refe)))
</code>
</pre>
<p>で、</p>
<div class="igBar"><span id="lruby-2"><a href="#" onclick="javascript:showPlainTxt('ruby-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-2">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#667755;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> hello</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> 'hello'</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#667755;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>こんなコードがあったら、puts にカーソルを移動して F1 を押すとミニバッファで</p>
<p>Class or Method (default puts):</p>
<p>と聞かれるので return、複数のクラスにメソッドが存在する場合は候補の一覧が表示され、適当なものを選択すればそのリファレンスが表示される、というわけでした。</p>
<p>これでソースを読んでいけば良いのかしら。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/110/feed</wfw:commentRss>
		</item>
		<item>
		<title>CarbonEmacs に ddskk をインストールしてみる</title>
		<link>http://www.forever5yearsold.net/archives/109</link>
		<comments>http://www.forever5yearsold.net/archives/109#comments</comments>
		<pubDate>Sat, 18 Oct 2008 03:12:40 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[Emacs]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/109</guid>
		<description><![CDATA[やりたいことがいろいろあって困っちゃうあてくしですが、会社では Objective-C、自宅では Ruby を勉強しようと決めました。何となく。
というわけで、自宅の CarbonEmacs 環境を整えていかなくちゃって感じで、まずは　ddskk をインストールして使えるようにするまでのメモです。
http://openlab.ring.gr.jp/skk/maintrunk/ddskk-13.1.tar.gz
を適当な場所、ここではホームディレクトリの tmp 以下に持ってきて展開します。


[Masahiro@bilbao.local:~/tmp] $ wget http://openlab.ring.gr.jp/skk/maintrunk/ddskk-13.1.tar.gz
[Masahiro@bilbao.local:~/tmp] $ tar xzvf ddskk-13.1.tar.gz


辞書ファイル http://openlab.jp/skk/dic/SKK-JISYO.L.gz も持ってきて gunzip して CarbonEmacs のフォルダに移動なりコピーなりします。cp は sudo が必要かもしれません。


[Masahiro@bilbao.local:~/tmp] $ wget http://openlab.jp/skk/dic/SKK-JISYO.L.gz
[Masahiro@bilbao.local:~/tmp] $ gunzip SKK-JISYO.L.gz
[Masahiro@bilbao.local:~/tmp] $ mkdir /Applications/Emacs.app/Contents/Resources/share/skk
[Masahiro@bilbao.local:~/tmp] $ cp SKK-JISYO.L /Applications/Emacs.app/Contents/Resources/share/skk


先ほど展開した ddskk のディレクトリに移動してインストールします。ここも make には sudo が必要かも。


[Masahiro@bilbao.local:~/tmp/ddskk-13.1] $ SKK_LISPDIR=/Applications/Emacs.app/Contents/Resources/site-lisp/skk SKK_INFODIR=/Applications/Emacs.app/Contents/Resources/info SKK_DATADIR=/Applications/Emacs.app/Contents/Resources/share/skk; make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs install


.emacs に設定を追加します。


(set-input-method "japanese-skk")
(toggle-input-method nil)
(setq skk-large-jisyo [...]]]></description>
			<content:encoded><![CDATA[<p>やりたいことがいろいろあって困っちゃうあてくしですが、会社では Objective-C、自宅では Ruby を勉強しようと決めました。何となく。</p>
<p>というわけで、自宅の CarbonEmacs 環境を整えていかなくちゃって感じで、まずは　ddskk をインストールして使えるようにするまでのメモです。</p>
<p><a href="http://openlab.ring.gr.jp/skk/maintrunk/ddskk-13.1.tar.gz">http://openlab.ring.gr.jp/skk/maintrunk/ddskk-13.1.tar.gz</a></p>
<p>を適当な場所、ここではホームディレクトリの tmp 以下に持ってきて展開します。</p>
<pre>
<code>
[Masahiro@bilbao.local:~/tmp] $ wget http://openlab.ring.gr.jp/skk/maintrunk/ddskk-13.1.tar.gz
[Masahiro@bilbao.local:~/tmp] $ tar xzvf ddskk-13.1.tar.gz
</code>
</pre>
<p>辞書ファイル <a href="http://openlab.jp/skk/dic/SKK-JISYO.L.gz">http://openlab.jp/skk/dic/SKK-JISYO.L.gz</a> も持ってきて gunzip して CarbonEmacs のフォルダに移動なりコピーなりします。cp は sudo が必要かもしれません。</p>
<pre>
<code>
[Masahiro@bilbao.local:~/tmp] $ wget http://openlab.jp/skk/dic/SKK-JISYO.L.gz
[Masahiro@bilbao.local:~/tmp] $ gunzip SKK-JISYO.L.gz
[Masahiro@bilbao.local:~/tmp] $ mkdir /Applications/Emacs.app/Contents/Resources/share/skk
[Masahiro@bilbao.local:~/tmp] $ cp SKK-JISYO.L /Applications/Emacs.app/Contents/Resources/share/skk
</code>
</pre>
<p>先ほど展開した ddskk のディレクトリに移動してインストールします。ここも make には sudo が必要かも。</p>
<pre>
<code>
[Masahiro@bilbao.local:~/tmp/ddskk-13.1] $ SKK_LISPDIR=/Applications/Emacs.app/Contents/Resources/site-lisp/skk SKK_INFODIR=/Applications/Emacs.app/Contents/Resources/info SKK_DATADIR=/Applications/Emacs.app/Contents/Resources/share/skk; make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs install
</code>
</pre>
<p>.emacs に設定を追加します。</p>
<pre>
<code>
(set-input-method "japanese-skk")
(toggle-input-method nil)
(setq skk-large-jisyo "/Applications/Emacs.app/Contents/Resources/share/skk/SKK-JISYO.L")

;; モードラインの表示
(skk-modify-indicator-alist 'latin "[a]")
(skk-modify-indicator-alist 'hiragana "[あ]")
(skk-modify-indicator-alist 'katakana "[ア]")
(skk-modify-indicator-alist 'jisx0208-latin "[Ａ]")

(setq skk-indicator-use-cursor-color nil)

;; メッセージは日本語で表示する
(setq skk-japanese-message-and-error t)

;; "「"を入力したら"」"も自動で挿入する
(setq skk-auto-insert-paren t)

;; インクリメント検索
(add-hook 'isearch-mode-hook
          #'(lambda ()
              (when (and (boundp 'skk-mode)
                         skk-mode
                         skk-isearch-mode-enable)
                (skk-isearch-mode-setup))))
(add-hook 'isearch-mode-end-hook
          #'(lambda ()
              (when (and (featurep 'skk-isearch)
                         skk-isearch-mode-enable)
                (skk-isearch-mode-cleanup))))
</code>
</pre>
<p>こんな感じで、C-x C-j で SKK を使えるようになります。オス。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/109/feed</wfw:commentRss>
		</item>
		<item>
		<title>shell-mode で zsh の履歴を持ってくる</title>
		<link>http://www.forever5yearsold.net/archives/108</link>
		<comments>http://www.forever5yearsold.net/archives/108#comments</comments>
		<pubDate>Fri, 12 Sep 2008 10:00:57 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/108</guid>
		<description><![CDATA[[emacs][linux]shell-modeでzsh_historyから履歴を持ってこれないものかなですが、以下を .emacs に追加で実現できそうです。と会社の同僚が教えてくれました。


;; zsh の履歴を shell-mode で使う
(if (not (getenv "HISTFILE"))
    (setenv "HISTFILE" (expand-file-name "~/.zsh-history")))
(setq comint-input-ring-separator "n\(:.+:.;\)?"
      comint-input-ring-size 10000)


~/.zsh-history 部分は環境に合わせて変更してくださいって感じで。
こりゃ便利だ。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://d.hatena.ne.jp/rubikitch/20070916/1189909005">[emacs][linux]shell-modeでzsh_historyから履歴を持ってこれないものかな</a>ですが、以下を .emacs に追加で実現できそうです。と会社の同僚が教えてくれました。</p>
<pre>
<code>
;; zsh の履歴を shell-mode で使う
(if (not (getenv "HISTFILE"))
    (setenv "HISTFILE" (expand-file-name "~/.zsh-history")))
(setq comint-input-ring-separator "n\(:.+:.;\)?"
      comint-input-ring-size 10000)
</code>
</pre>
<p>~/.zsh-history 部分は環境に合わせて変更してくださいって感じで。</p>
<p>こりゃ便利だ。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/108/feed</wfw:commentRss>
		</item>
		<item>
		<title>Shindig を動かしてみる（PHP 版 Gadget Server）</title>
		<link>http://www.forever5yearsold.net/archives/106</link>
		<comments>http://www.forever5yearsold.net/archives/106#comments</comments>
		<pubDate>Wed, 23 Apr 2008 04:06:06 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[OpenSocial]]></category>

		<category><![CDATA[プログラミング]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/106</guid>
		<description><![CDATA[Shindig を動かしてみるその２。久しぶりにレポジトリ見ると PHP 版の Gadget Server ができているようなので README 見ながら試してみます。
環境は前回と同じで、coLinux、Linux debian 2.6.17-co-0.8.0 #1 PREEMPT Sun Jul 8 14:00:12 CEST 2007 i686 GNU/Linux です。


[maihara@debian:~/work] $ svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk shindig
[maihara@debian:~/work] $ shindig/php/gadgets
[maihara@debian:~/work/shindig/php/gadgets] $ l
合計 16
-rw-r--r-- 1 maihara maihara  893 2008-04-23 10:59 README
-rw-r--r-- 1 maihara maihara 2294 2008-04-23 10:59 config.php
-rw-r--r-- 1 maihara maihara 2548 2008-04-23 10:59 index.php
drwxr-xr-x 4 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.forever5yearsold.net/archives/85">Shindig を動かしてみる</a>その２。久しぶりに<a href="http://svn.apache.org/repos/asf/incubator/shindig/trunk/">レポジトリ</a>見ると PHP 版の Gadget Server ができているようなので <a href="http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/gadgets/README">README</a> 見ながら試してみます。</p>
<p>環境は前回と同じで、coLinux、Linux debian 2.6.17-co-0.8.0 #1 PREEMPT Sun Jul 8 14:00:12 CEST 2007 i686 GNU/Linux です。</p>
<pre>
<code>
[maihara@debian:~/work] $ svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk shindig
[maihara@debian:~/work] $ shindig/php/gadgets
[maihara@debian:~/work/shindig/php/gadgets] $ l
合計 16
-rw-r--r-- 1 maihara maihara  893 2008-04-23 10:59 README
-rw-r--r-- 1 maihara maihara 2294 2008-04-23 10:59 config.php
-rw-r--r-- 1 maihara maihara 2548 2008-04-23 10:59 index.php
drwxr-xr-x 4 maihara maihara 4096 2008-04-23 10:59 src/
[maihara@debian:~/work/shindig/php/gadgets] $ v README
Installing and Running The PHP Shindig Gadget Server
============================================

1) Make sure you have PHP 5.x installed and have the simplexml and json extentions enabled; It also
   requires apache with .htaccess and mod_rewrite support

2) Copy the files to your web root, and edit the config.php web_prefix and debug settings
   to your liking. Make sure that the features and javascript directories are also copied
   or edit your config.php to reflect their location.

3) Hit server at http://<yourhost>/gadgets/ifr?url=<gadget-url>
   Example: http://<yourhost>/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml
   Or hit the sample container at http://<yourhost>/gadgets/files/samplecontainer/samplecontainer.html

The PHP source of the gadget server resides in gadgets/src.

For more information, see http://incubator.apache.org/projects/shindig.html
</code>
</pre>
<p>というわけで、まずは必要なファイルをコピー。</p>
<pre>
<code>
[maihara@debian:~/work/shindig/php/gadgets] $ cp -R ../gadgets ~/public_html
[maihara@debian:~/work/shindig/php/gadgets] $ cp -R .htaccess ../../config ../../features ../../javascript ~/public_html/gadgets
[maihara@debian:~/work/shindig/php/gadgets] $ ~/public_html/gadgets
</code>
</pre>
<p>設定を編集、の前に mod_rewrite を有効に。</p>
<pre>
<code>
[maihara@debian:~/public_html/gadgets] $ /etc/apache2/mods-enabled
[maihara@debian:/etc/apache2/mods-enabled] $ sudo ln -s ../mods-available/rewrite.load
[maihara@debian:/etc/apache2/mods-enabled] $ /etc/apache2/sites-available
[maihara@debian:/etc/apache2/sites-available] $ sudo cp default default.bak
[maihara@debian:/etc/apache2/sites-available] $ diff -u default.bak default
--- default.bak 2008-04-23 12:12:26.000000000 +0900
+++ default     2008-04-23 12:39:42.000000000 +0900
@@ -38,6 +38,10 @@
                UserDir public_html
        </IfModule>

+       <Directory /home/*/public_html>
+               AllowOverride All
+       </Directory>
+
     Alias /doc/ "/usr/share/doc/"
     <Directory "/usr/share/doc/">
         Options Indexes MultiViews FollowSymLinks
[maihara@debian:/etc/apache2/sites-available] $ sudo /etc/init.d/apache2 restart
</code>
</pre>
<p>設定を編集。</p>
<pre>
<code>
[maihara@debian:/etc/apache2/mods-enabled] $ ~/public_html/gadgets
[maihara@debian:~/public_html/gadgets] $ cp config.php config.php.bak
[maihara@debian:~/public_html/gadgets] $ vi config.php
[maihara@debian:~/public_html/gadgets] $ diff -u config.php.bak config.php
--- config.php.bak      2008-04-23 11:26:01.000000000 +0900
+++ config.php  2008-04-23 12:20:28.000000000 +0900
@@ -9,15 +9,15 @@
        // The base prefix under which the gadget url's live, if its the root set this to ''
        // don't forget to update your .htaccess to reflect this, as well as your container
        // javascript like: gadget.setServerBase('/gadgets/');
-       'web_prefix' => '/gadgets',
+       'web_prefix' => '/~maihara/gadgets',

        // location of the features directory on disk. The default setting assumes you did a
        // full checkout of the shindig project, and not just the php part.
        // Otherwise also checkout the features, config and javascript directories and set
        // these to their locations
-       'features_path' =>  realpath(dirname(__FILE__)).'/../../features/',
-       'container_path' =>  realpath(dirname(__FILE__)).'/../../config/',
-       'javascript_path' =>  realpath(dirname(__FILE__)).'/../../javascript/',
+       'features_path' =>  realpath(dirname(__FILE__)).'/features/',
+       'container_path' =>  realpath(dirname(__FILE__)).'/config/',
+       'javascript_path' =>  realpath(dirname(__FILE__)).'/javascript/',

        // If you want to use the yuicompressor (http://developer.yahoo.com/yui/compressor/) to minify your javascript
        // set this to the yuicompressor-?.jar's file path

[maihara@debian:~/public_html/gadgets] $ diff -u .htaccess.bak .htaccess
--- .htaccess.bak       2008-04-23 12:41:43.000000000 +0900
+++ .htaccess   2008-04-23 12:20:50.000000000 +0900
@@ -3,5 +3,5 @@
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule . /gadgets/index.php [L]
+RewriteRule . /~maihara/gadgets/index.php [L]
 </IfModule>
</code>
</pre>
<p>んな感じっすか。</p>
<p>で、http://localhost:8080/~maihara/gadgets/files/samplecontainer/samplecontainer.html にアクセスすると以下のような画面が。</p>
<p><a href='http://www.forever5yearsold.net/wp-content/uploads/2008/04/gadget-testing-container.png' title='gadget-testing-container.png'><img src='http://www.forever5yearsold.net/wp-content/uploads/2008/04/gadget-testing-container.png' alt='gadget-testing-container.png' width='341' height='222' /></a></p>
<p>curl_init() が失敗しているので php5-curl をインストール。</p>
<pre>
<code>
[maihara@debian:~/public_html/gadgets] $ sudo aptitude install php5-curl
[maihara@debian:~/public_html/gadgets] $ sudo /etc/init.d/apache2 restart
</code>
</pre>
<p>で、そのエラーは出なくなったけど今後は Failed to retrieve gadget content ってエラーが出ております。</p>
<p>見るページを変えます。README にあるように http://localhost:8080/~maihara/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml にアクセス。と、これはこれで Unsupported feature(s): locked-domain つってエラーだ YO!</p>
<p>面倒なってきましたが、ソース src/GadgetServer.php の 163 行目あたりを見てみると http://www.labpixies.com/campaigns/todo/todo.xml にある locked-domain がサポートされていない機能だっつって怒られているようなので、もうちょっと調べないとだけど時間切れ。</p>
<p>というか仕組みをもっと調べないと。</p>
<p>[2008/04/28 追記]</p>
<p><a href="http://code.google.com/apis/gadgets/docs/reference.html#lockeddomain">locked-domain</a> はこれ。ユーザのセンシティブなデータを保存するときはこの機能を使えとのことだけど、実際の動作がどう変わるのかはまだわからない。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/106/feed</wfw:commentRss>
		</item>
		<item>
		<title>coLinux 上に Google App Engine の開発環境を作ってみる</title>
		<link>http://www.forever5yearsold.net/archives/105</link>
		<comments>http://www.forever5yearsold.net/archives/105#comments</comments>
		<pubDate>Mon, 21 Apr 2008 01:15:19 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[Google App Engine]]></category>

		<category><![CDATA[coLinux]]></category>

		<category><![CDATA[プログラミング]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/105</guid>
		<description><![CDATA[久しぶりだわ。
遅ればせながら Google App Engine 使えるようになりました。
自宅の Macbook の方はインストーラ入れれば一発で開発環境でけたのですが、会社の coLinux の方は提供されている zip なものから作ってみます。
まずは SDK をダウンロード。


[maihara@debian:~] $ mkdir sdks
[maihara@debian:~] $ sdks
[maihara@debian:~/sdks] $ wget http://googleappengine.googlecode.com/files/google_appengine_1.0.1.zip
[maihara@debian:~/sdks] $ unzip google_appengine_1.0.1.zip


google_appengine/appcfg.py と google_appengine/dev_appserver.py にパスを通します。~/bin にはあらかじめパスを通してあるので、こんな感じ。


[maihara@debian:~/sdks] $ ~/bin
[maihara@debian:~/bin] $ ln -sf ~/sdks/google_appengine/dev_appserver.py
[maihara@debian:~/bin] $ ln -sf ~/sdks/google_appengine/appcfg.py


で、早速実行なわけですが、python2.5 で動かしてくださいとのことなので、python2.4 な環境だと以下のようなエラーになります。


[maihara@debian:~] $ dev_appserver.py              [...]]]></description>
			<content:encoded><![CDATA[<p>久しぶりだわ。</p>
<p>遅ればせながら <a href="http://code.google.com/appengine/">Google App Engine</a> 使えるようになりました。</p>
<p>自宅の Macbook の方はインストーラ入れれば一発で開発環境でけたのですが、会社の coLinux の方は<a href="http://code.google.com/appengine/downloads.html">提供されている zip なもの</a>から作ってみます。</p>
<p>まずは SDK をダウンロード。</p>
<pre>
<code>
[maihara@debian:~] $ mkdir sdks
[maihara@debian:~] $ sdks
[maihara@debian:~/sdks] $ wget http://googleappengine.googlecode.com/files/google_appengine_1.0.1.zip
[maihara@debian:~/sdks] $ unzip google_appengine_1.0.1.zip
</code>
</pre>
<p>google_appengine/appcfg.py と google_appengine/dev_appserver.py にパスを通します。~/bin にはあらかじめパスを通してあるので、こんな感じ。</p>
<pre>
<code>
[maihara@debian:~/sdks] $ ~/bin
[maihara@debian:~/bin] $ ln -sf ~/sdks/google_appengine/dev_appserver.py
[maihara@debian:~/bin] $ ln -sf ~/sdks/google_appengine/appcfg.py
</code>
</pre>
<p>で、早速実行なわけですが、python2.5 で動かしてくださいとのことなので、python2.4 な環境だと以下のようなエラーになります。</p>
<pre>
<code>
[maihara@debian:~] $ dev_appserver.py                                                                                                            [1194  10:11午前]
Warning: Python 2.4 is not supported; this program may break. Please use version 2.5 or greater.
Invalid arguments
Runs a development application server for an application.
...
</code>
</pre>
<p>Invalid arguments はアプリケーションを指定していないからなので気にしません。</p>
<p>というわけで、/usr/bin/python が python2.5 を見てくれるように設定。</p>
<pre>
<code>
[maihara@debian:~] $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.4 90                                             [1186  10:09午前]
[maihara@debian:~] $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.5 100                                            [1187  10:09午前]
[maihara@debian:~] $ sudo update-alternatives --config python

`python' を提供する 2 個の alternatives があります。

  選択肢       alternative
-----------------------------------------------
          1    /usr/bin/python2.4
*+        2    /usr/bin/python2.5

デフォルト[*] のままにするには Enter、さもなければ選択肢の番号のキーを押してください:

[maihara@debian:~] $ sudo update-alternatives --display python                                                                                   [1189  10:09午前]
python -状態は auto。
 リンクは現在 /usr/bin/python2.5 を指しています
/usr/bin/python2.4 - 優先度 90
/usr/bin/python2.5 - 優先度 100
現在の `最適' バージョンは /usr/bin/python2.5 です。
</code>
</pre>
<p>なんつう感じで。で、もう一度実行してみると、</p>
<pre>
<code>
[maihara@debian:~] $ dev_appserver.py                                                                                                            [1196  10:11午前]
Invalid arguments
Runs a development application server for an application.
...
</code>
</pre>
<p>と怒られなくなりましたヨ。</p>
<p>自宅で <a href="http://code.google.com/appengine/docs/gettingstarted/">Getting Started</a> の <a href="http://code.google.com/appengine/docs/gettingstarted/helloworld.html">Hello, World!</a> までやってみたので、先に進んでみます。まだそこかよって感じですけど。</p>
<ul>
<li style="display: inline"> <iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=foreve5yearso-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=4774134325&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=404040&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" style="width: 120px; height: 240px" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></li>
<li style="display: inline">
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=foreve5yearso-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4873112109&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;lc1=404040&#038;bc1=FFFFFF&#038;bg1=FFFFFF&#038;f=ifr&#038;nou=1" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/105/feed</wfw:commentRss>
		</item>
		<item>
		<title>らーめん専門店小川に行ってみた</title>
		<link>http://www.forever5yearsold.net/archives/104</link>
		<comments>http://www.forever5yearsold.net/archives/104#comments</comments>
		<pubDate>Sun, 09 Mar 2008 09:20:57 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[ご飯]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/104</guid>
		<description><![CDATA[iPod touch の入れ物買いに渋谷のアップルストアに行く前に、道玄坂にあるらーめん専門店小川ってラーメン屋さんに行ってみました。
ノリノリらーめんってやつを頼んでみたんですが、のり、多くね？のり、多いね。
 .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } 
 	
IMG_1282, originally uploaded by forever5yearsold.
&#160;
味は普通においしかったです。あっさり目のとんこつって感じでしょうか。適当ですが。右上にビールがちらっと見えますね。
]]></description>
			<content:encoded><![CDATA[<p>iPod touch の入れ物買いに渋谷のアップルストアに行く前に、道玄坂にある<a href="http://www15.ocn.ne.jp/~ofas/">らーめん専門店小川</a>ってラーメン屋さんに行ってみました。</p>
<p>ノリノリらーめんってやつを頼んでみたんですが、のり、多くね？のり、多いね。</p>
<style type="text/css"> .flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; } </style>
<p class="flickr-frame"> 	<a href="http://www.flickr.com/photos/forever5yearsold/2320831616/" title="photo sharing"><img src="http://farm4.static.flickr.com/3043/2320831616_953b9fe234.jpg" class="flickr-photo" /></a></p>
<p><span class="flickr-caption"><a href="http://www.flickr.com/photos/forever5yearsold/2320831616/">IMG_1282</a>, originally uploaded by <a href="http://www.flickr.com/people/forever5yearsold/">forever5yearsold</a>.</span></p>
<p class="flickr-yourcomment">&nbsp;</p>
<p>味は普通においしかったです。あっさり目のとんこつって感じでしょうか。適当ですが。右上にビールがちらっと見えますね。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/104/feed</wfw:commentRss>
		</item>
		<item>
		<title>builder tech day 行ってきます</title>
		<link>http://www.forever5yearsold.net/archives/103</link>
		<comments>http://www.forever5yearsold.net/archives/103#comments</comments>
		<pubDate>Mon, 25 Feb 2008 03:00:52 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[いろいろ]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/103</guid>
		<description><![CDATA[builder tech day に参加できることになりました。
13 時から 21 時半ってめっちゃ長いですが、日本の人で世界にインパクトを与えることができる技術者の一人である（と思う）、宮川達彦さんの話を聞けるのはうれしいです。
後半にある Lightning talks みたいなものにも一回出てみたいと思うのですが、デモできるような手持ちの API もなく寂しさ満点です。
頑張っておもしろい API 公開しよう、と改めて思いました。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://builder.japan.zdnet.com/info/techday/">builder tech day</a> に参加できることになりました。</p>
<p>13 時から 21 時半ってめっちゃ長いですが、日本の人で世界にインパクトを与えることができる技術者の一人である（と思う）、宮川達彦さんの話を聞けるのはうれしいです。</p>
<p>後半にある Lightning talks みたいなものにも一回出てみたいと思うのですが、デモできるような手持ちの API もなく寂しさ満点です。</p>
<p>頑張っておもしろい API 公開しよう、と改めて思いました。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/103/feed</wfw:commentRss>
		</item>
		<item>
		<title>Google Reader のオフライン機能がエラーを出す</title>
		<link>http://www.forever5yearsold.net/archives/102</link>
		<comments>http://www.forever5yearsold.net/archives/102#comments</comments>
		<pubDate>Sat, 26 Jan 2008 12:09:29 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[GoogleGears]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/102</guid>
		<description><![CDATA[Google Reader の英語版？は Google Gears に対応しているので、僕は http://www.google.com/reader/view/?hl=en で使っているのですが、オンライン、オフラインを試していると、オンラインにしようとしたときに Synchronizing your items has failed. とエラーが出るようになってしまいました。実害は不明ですが気持ちが悪いので消したい。
そんな人がいるかどうかわかりませんが、Local Server のキャッシュを消すと直りました。キャッシュの場所は OS によって違うので要確認ですが、Mac だとこんな感じ。

[ihara@Macintosh.local:~] $ l Library/Caches/Firefox/Profiles/20fib5ky.default/Google Gears for Firefox/www.google.com/http_80
total 15120
-rw-------    1 ihara  ihara  7725056  1 26 18:02 GR-3050b710613f30#database
drwxr-xr-x@ 115 ihara  ihara     3910  1 26 13:26 GR-3050b710613f30_managed[47]#localserver/
-rw-------  [...]]]></description>
			<content:encoded><![CDATA[<p>Google Reader の英語版？は Google Gears に対応しているので、僕は <a href="http://www.google.com/reader/view/?hl=en">http://www.google.com/reader/view/?hl=en</a> で使っているのですが、オンライン、オフラインを試していると、オンラインにしようとしたときに Synchronizing your items has failed. とエラーが出るようになってしまいました。実害は不明ですが気持ちが悪いので消したい。</p>
<p>そんな人がいるかどうかわかりませんが、Local Server のキャッシュを消すと直りました。キャッシュの場所は OS によって違うので要確認ですが、Mac だとこんな感じ。</p>
<pre>
[ihara@Macintosh.local:~] $ l Library/Caches/Firefox/Profiles/20fib5ky.default/Google Gears for Firefox/www.google.com/http_80
total 15120
-rw-------    1 ihara  ihara  7725056  1 26 18:02 GR-3050b710613f30#database
drwxr-xr-x@ 115 ihara  ihara     3910  1 26 13:26 GR-3050b710613f30_managed[47]#localserver/
-rw-------    1 ihara  ihara    16384  1 21 23:13 GR-global#database
drwxr-xr-x@   3 ihara  ihara      102  1 18 23:24 ihara2525@gmail.com@@pref.calendar.google.com[11]#localserver/
</pre>
<p>GR で始まっているものが Google Reader のものっぽいので、それらを全部削除。</p>
<p>そうすると頭のエラーが出ないようになりました。フー。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/102/feed</wfw:commentRss>
		</item>
		<item>
		<title>coLinux のディスクイメージのサイズを大きくしてみる</title>
		<link>http://www.forever5yearsold.net/archives/101</link>
		<comments>http://www.forever5yearsold.net/archives/101#comments</comments>
		<pubDate>Sat, 26 Jan 2008 04:37:58 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[coLinux]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/101</guid>
		<description><![CDATA[Windows なノート PC に coLinux が入ってると何かと便利。
というわけでいろいろモリモリ入れてると、どこかからもらってきた 1GB の Debian-4.0r0-etch.ext3.1gb では残り容量が心許なくなってきました。なのでサイズ大きくしてみます。
coLinux 自体はいつかスナップショットを持ってきた覚えがあるのでバージョンがはっきりしないですが、設定ファイルは XML ファイルじゃなくなってます。README.txt を見るとバージョン 0.8.0。uname -a の結果は Linux debian 2.6.17-co-0.8.0 #1 PREEMPT Sun Jul 8 14:00:12 CEST 2007 i686 GNU/Linux でした。
まずは Windows のコマンドプロンプトでイメージファイルを作成。5GB にします。


C:Program FilescoLinux>fsutil file createnew colinux.img 5368709120


次に coLinux の設定ファイルを編集し、末尾に今作成した cobd2=colinux.img を追加。


#
# This is an example for a configuration file that can
# be passed [...]]]></description>
			<content:encoded><![CDATA[<p>Windows なノート PC に coLinux が入ってると何かと便利。</p>
<p>というわけでいろいろモリモリ入れてると、どこかからもらってきた 1GB の Debian-4.0r0-etch.ext3.1gb では残り容量が心許なくなってきました。なのでサイズ大きくしてみます。</p>
<p>coLinux 自体はいつかスナップショットを持ってきた覚えがあるのでバージョンがはっきりしないですが、設定ファイルは XML ファイルじゃなくなってます。README.txt を見るとバージョン 0.8.0。uname -a の結果は Linux debian 2.6.17-co-0.8.0 #1 PREEMPT Sun Jul 8 14:00:12 CEST 2007 i686 GNU/Linux でした。</p>
<p>まずは Windows のコマンドプロンプトでイメージファイルを作成。5GB にします。</p>
<pre>
<code>
C:Program FilescoLinux>fsutil file createnew colinux.img 5368709120
</code>
</pre>
<p>次に coLinux の設定ファイルを編集し、末尾に今作成した cobd2=colinux.img を追加。</p>
<pre>
<code>
#
# This is an example for a configuration file that can
# be passed to colinux-daemon in this manner:
#
#    colinux-daemon @example.conf
#
# Note that you can still prepend or append configuration and
# boot parameters before and after '@', or you can use more
# that one '@ to load several settings one after another.
#
#    colinux-daemon @example.conf @overrider.conf mem=32
#
# Full list of config params is listed in colinux-daemon.txt.

# The default kernel
kernel=vmlinux

# File contains the root file system.
# Download and extract preconfigured file from SF "Images for 2.6".
cobd0=Debian-4.0r0-etch.ext3.1gb

# Swap device, should be an empty file with 128..512MB.
cobd1=swap_device

# Tell kernel the name of root device (mostly /dev/cobd0,
# /dev/cobd/0 on Gentoo)
# This parameter will be forward to Linux kernel.
root=/dev/cobd0

# Additional kernel parameters (ro = rootfs mount read only)
ro

# Initrd installs modules into the root file system.
# Need only on first boot.
initrd=initrd.gz

# Maximal memory for linux guest
mem=128

# Slirp for internet connection (outgoing)
# Inside running coLinux configure eth0 with this static settings:
# ipaddress 10.0.2.15   broadcast  10.0.2.255   netmask 255.255.255.0
# gateway   10.0.2.2    nameserver 10.0.2.3
eth0=slirp,,tcp:2222:22/tcp:8080:80/tcp:8088:8080

# Tuntap as private network between guest and host on second linux device
#eth1=tuntap

# Setup for serial device
#ttys0=COM1,"BAUD=115200 PARITY=n DATA=8 STOP=1 dtr=on rts=on"

# Run an application on colinux start (Sample Xming, a Xserver)
#exec0=C:ProgramsXmingXming.exe,":0 -clipboard -multiwindow -ac"

cobd2=colinux_new.img
</code>
</pre>
<p>coLinux を起動しログイン。/dev/cobd2 として認識されているのでイメージを丸々コピーします。</p>
<pre>
<code>
[maihara@debian:~] $ sudo dd if=/dev/cobd0 of=/dev/cobd2
2095104+0 records in
2095104+0 records out
1072693248 bytes (1.1 GB) copied, 613.193 seconds, 1.7 MB/s
</code>
</pre>
<p>時間かかるので待ちます。</p>
<p>ファイルシステムをチェック、サイズを変更して全ての領域を使います。</p>
<pre>
<code>
[maihara@debian:~] $ sudo e2fsck -f /dev/cobd2
e2fsck 1.40-WIP (14-Nov-2006)
/dev/cobd2: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/cobd2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/cobd2: 39866/131072 files (1.7% non-contiguous), 216011/261888 blocks

[maihara@debian:~] $ sudo /sbin/resize2fs -p /dev/cobd2
resize2fs 1.40-WIP (14-Nov-2006)
Resizing the filesystem on /dev/cobd2 to 1310720 (4k) blocks.
Begin pass 1 (max = 32)
Extending the inode table     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/cobd2 is now 1310720 blocks long.
</code>
</pre>
<p>終わり。</p>
<pre>
<code>
debian:~# shutdown -h now
</code>
</pre>
<p>等で coLinux を終了させます。</p>
<p>設定ファイルの cobd0 を今操作した colinux.img に変更して coLinux を再起動。</p>
<pre>
<code>
#
# This is an example for a configuration file that can
# be passed to colinux-daemon in this manner:
#
#    colinux-daemon @example.conf
#
# Note that you can still prepend or append configuration and
# boot parameters before and after '@', or you can use more
# that one '@ to load several settings one after another.
#
#    colinux-daemon @example.conf @overrider.conf mem=32
#
# Full list of config params is listed in colinux-daemon.txt.

# The default kernel
kernel=vmlinux

# File contains the root file system.
# Download and extract preconfigured file from SF "Images for 2.6".
cobd0=colinux.img

# Swap device, should be an empty file with 128..512MB.
cobd1=swap_device

# Tell kernel the name of root device (mostly /dev/cobd0,
# /dev/cobd/0 on Gentoo)
# This parameter will be forward to Linux kernel.
root=/dev/cobd0

# Additional kernel parameters (ro = rootfs mount read only)
ro

# Initrd installs modules into the root file system.
# Need only on first boot.
initrd=initrd.gz

# Maximal memory for linux guest
mem=128

# Slirp for internet connection (outgoing)
# Inside running coLinux configure eth0 with this static settings:
# ipaddress 10.0.2.15   broadcast  10.0.2.255   netmask 255.255.255.0
# gateway   10.0.2.2    nameserver 10.0.2.3
eth0=slirp,,tcp:2222:22/tcp:8080:80/tcp:8088:8080

# Tuntap as private network between guest and host on second linux device
#eth1=tuntap

# Setup for serial device
#ttys0=COM1,"BAUD=115200 PARITY=n DATA=8 STOP=1 dtr=on rts=on"

# Run an application on colinux start (Sample Xming, a Xserver)
#exec0=C:ProgramsXmingXming.exe,":0 -clipboard -multiwindow -ac"
</code>
</pre>
<p>ログインしてサイズが増えていることを確認します。</p>
<pre>
<code>
[maihara@debian:~] $ df -h
Filesystem          サイズ  使用  残り 使用% マウント位置
/dev/cobd0            5.0G  828M  4.0G  18% /
tmpfs                  62M     0   62M   0% /lib/init/rw
udev                   10M   16K   10M   1% /dev
tmpfs                  62M     0   62M   0% /dev/shm
</code>
</pre>
<p>サイズが 5GB になりました。前の Debian-4.0r0-etch.ext3.1gb は用済みなので削除して作業完了です。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/101/feed</wfw:commentRss>
		</item>
		<item>
		<title>キティいなり</title>
		<link>http://www.forever5yearsold.net/archives/100</link>
		<comments>http://www.forever5yearsold.net/archives/100#comments</comments>
		<pubDate>Sun, 20 Jan 2008 06:28:56 +0900</pubDate>
		<dc:creator>ihara</dc:creator>
		
		<category><![CDATA[いろいろ]]></category>

		<guid isPermaLink="false">http://www.forever5yearsold.net/archives/100</guid>
		<description><![CDATA[
.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }


	

	IMG_1211, originally uploaded by forever5yearsold.


	先日家に帰ったらキティいなりが。きゃわゆいのう。
ガブリと食べました。
]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }
</style>
<div class="flickr-frame">
	<a href="http://www.flickr.com/photos/forever5yearsold/2205789456/" title="photo sharing"><img src="http://farm3.static.flickr.com/2358/2205789456_152a544de5.jpg" class="flickr-photo" alt="" /></a><br />
<br />
	<span class="flickr-caption"><a href="http://www.flickr.com/photos/forever5yearsold/2205789456/">IMG_1211</a>, originally uploaded by <a href="http://www.flickr.com/people/forever5yearsold/">forever5yearsold</a>.</span>
</div>
<p class="flickr-yourcomment">
	先日家に帰ったらキティいなりが。きゃわゆいのう。</p>
<p>ガブリと食べました。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forever5yearsold.net/archives/100/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
