<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>forever 5 years old blog &#187; tips</title>
	<atom:link href="http://www.f5yo.net/archives/tag/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://www.f5yo.net</link>
	<description>今年も 5 歳になりました</description>
	<lastBuildDate>Wed, 29 Apr 2009 01:32:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ruby-indent-command や ruby-insert-end がなくて怒られた</title>
		<link>http://www.f5yo.net/archives/148</link>
		<comments>http://www.f5yo.net/archives/148#comments</comments>
		<pubDate>Wed, 29 Apr 2009 01:32:39 +0000</pubDate>
		<dc:creator>ihara</dc:creator>
				<category><![CDATA[いろいろ]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.f5yo.net/?p=148</guid>
		<description><![CDATA[CarbonEmacs の ruby-mode を使っていて、



Symbol's function definition is void: ruby-indent-command




や



Sy [...]]]></description>
			<content:encoded><![CDATA[<p>
CarbonEmacs の ruby-mode を使っていて、
</p>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">Symbol's function definition is void: ruby-indent-command</pre></div></div>



<p>
や
</p>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">Symbol's function definition is void: ruby-insert-end</pre></div></div>



<p>
なんつって怒られるときは、/Applications/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode.el に問題があるようなので、<a href="http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/">[ruby] Index of /trunk/misc</a> この辺から ruby-mode.el をもらってきて byte-compile-file 等して、/Applications/Emacs.app/Contents/Resources/lisp/progmodes の下に保存し直してあげましょう。
</p>
<p>
そんだけ！
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f5yo.net/archives/148/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Fusion でポートフォワードする</title>
		<link>http://www.f5yo.net/archives/144</link>
		<comments>http://www.f5yo.net/archives/144#comments</comments>
		<pubDate>Sat, 21 Mar 2009 08:49:43 +0000</pubDate>
		<dc:creator>ihara</dc:creator>
				<category><![CDATA[いろいろ]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.f5yo.net/?p=144</guid>
		<description><![CDATA[Mac で VMware Fusion を使っているんだけどゲスト OS の Windows に無性にポートフォワードしたくなることって、ありますね。

うちはフレッツ光のマンションタイプに入っていて、無線 LAN  [...]]]></description>
			<content:encoded><![CDATA[<p>Mac で VMware Fusion を使っているんだけどゲスト OS の Windows に無性にポートフォワードしたくなることって、ありますね。</p>

<p>うちはフレッツ光のマンションタイプに入っていて、無線 LAN のルータで自宅内にネットワークを組んでいるので、以下のような環境を想定します。</p>

<p>
Mac の IP アドレス: 192.168.11.2<br />
vmnet8 の IP アドレス: 172.16.27.1<br />
フォワードしたいポート: 12345<br />
</p>

<p>ルータの設定でポート 12345 へのアクセスを Mac の 192.168.11.2 にアクセスさせる設定は飛ばします。適当にやりましょう。</p>
<p>VMware Fusion の設定ですが、こんな感じで。</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">[Masahiro@masahiro.local:~] $ cd /Library/Application\ Support/VMware\ Fusion
[Masahiro@masahiro.local:/Library/Application Support/VMware Fusion] $ sudo cp vmnet-nat.conf vmnet-nat.conf.bak
[Masahiro@masahiro.local:/Library/Application Support/VMware Fusion] $ sudo vi vmnet-nat.conf
[Masahiro@masahiro.local:/Library/Application Support/VMware Fusion] $ diff -u vmnet-nat.conf.bak vmnet-nat.conf
--- vmnet-nat.conf.bak  2009-03-21 16:43:32.000000000 +0900
+++ vmnet-nat.conf      2009-03-21 16:44:01.000000000 +0900
@@ -41,6 +41,8 @@
 #      ssh -p 8889 root@localhost
 #8889 = 172.16.226.128:22
&nbsp;
+12345 = 172.16.27.1:12345
+
 [incomingudp]
 # UDP port forwarding example
 #6000 = 172.16.226.128:6001
[Masahiro@masahiro.local:/Library/Application Support/VMware Fusion] $ sudo ./vmware-config-net.pl
[Masahiro@masahiro.local:/Library/Application Support/VMware Fusion] $ sudo ./boot.sh --restart</pre></td></tr></table></div>




<p>3 行目で vmnet-nat.conf を編集して、[incomingtcp] の下に、ホスト OS からフォワードするポートと、フォワードするゲスト OS の IP アドレスとポートを指定します。で、16 行目で vmware-config-net.pl を実行して設定ファイルを書き換え（これで vmnet8/nat.conf が書き換わります）、17 行目でリスタート。</p>

<p>これで僕の環境だとポートフォワードできるようになったのですが、環境が違ったらダメなのかも。そしたらごめんなさい。めっちゃポートフォワードしたいねん、ってたまらん状態になったら試してみても良いかもしれません。</p>]]></content:encoded>
			<wfw:commentRss>http://www.f5yo.net/archives/144/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sSMTP で Gmail からメールを送る</title>
		<link>http://www.f5yo.net/archives/1</link>
		<comments>http://www.f5yo.net/archives/1#comments</comments>
		<pubDate>Sat, 14 Feb 2009 06:01:49 +0000</pubDate>
		<dc:creator>ihara</dc:creator>
				<category><![CDATA[いろいろ]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.f5yo.net/wordpress/?p=1</guid>
		<description><![CDATA[Debian を入れて自宅サーバとして使っていた Thinkpad T42 が Fan Error で起動しなくなり、パーツ交換するのも面倒だし中古の X40 2371-7VJ を GENO で 3 万円弱で買いました。 [...]]]></description>
			<content:encoded><![CDATA[<p>Debian を入れて自宅サーバとして使っていた Thinkpad T42 が Fan Error で起動しなくなり、パーツ交換するのも面倒だし中古の X40 2371-7VJ を <a href="http://www.geno-web.jp/">GENO</a> で 3 万円弱で買いました。サイトが多少重いときがあるみたいですが、安いですし届いたマシンもめちゃきれいでした。</p>
<p>というわけで、今回は Ubuntu 入れてみようと思い CD ドライブもないので <a href="http://unetbootin.sourceforge.net/">UNetBootin</a> で Ubuntu 8.10 を選んでインストール。Windows のパーティションもガツンと消して無事完了。</p>
<p>パッケージの管理の仕方も Debian とほとんど同じみたいだしセットアップで困ることはあまりなかったのですが、WordPress の WP-DB-Backup でバックアップを定期的にメールで送ろうとすると PHPMailer が使う /usr/sbin/sendmail を用意してあげないといけません。Sendmail とか Postfix とか別にメールサーバ立てたいわけじゃなくて送信だけしたいんスよ、というわけで sSMTP。</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ sudo apt-get install ssmtp</pre></div></div>



<p>でインストールして、Gmail のアカウントからメールを送れるよう /etc/ssmtp/ssmtp.conf を編集します。23 行目の AuthUser と 24 行目の AuthPass は自分のアカウントのものにすれば良いです。</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids &lt; 1000
# Make this empty to disable rewriting.
root=postmaster
&nbsp;
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com
&nbsp;
# Where will the mail seem to come from?
rewriteDomain=gmail.com
&nbsp;
# The full hostname
hostname=gmail.com
&nbsp;
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
&nbsp;
AuthUser=your_id@gmail.com
AuthPass=your_password
useSTARTTLS=YES
# DEBUG=YES</pre></td></tr></table></div>



<p>で、テスト。最終行の test を入力して改行した後は Ctrl-D で抜けます。From と To は自分のアドレスを指定しましょう。</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ sendmail -t
From: your_id@gmail.com
To: your_id@gmail.com
Subject: test
&nbsp;
test</pre></div></div>



<p>これで Gmail に自分からメールが届くはずです。めでたい。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f5yo.net/archives/1/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

