<?xml version="1.0" encoding="utf-8"?>

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="http://carz.air-nifty.com/sowhat/">
<title>C:SetPatch QUIET</title>
<link>http://carz.air-nifty.com/sowhat/</link>
<description>備忘録代わりに…</description>
<dc:language>ja-JP</dc:language>
<dc:creator></dc:creator>
<dc:date>2017-05-29T03:25:22+09:00</dc:date>


<items>
<rdf:Seq><rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-1137.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-6342.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2015/10/firefox41-keysn.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2015/01/post-c210.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2014/08/android-adb-bac.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2014/05/post-2484.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2013/12/ntemacs-tramp-s.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2013/12/auto-dial-10-wo.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2013/11/outlook-emacs-9.html" />
<rdf:li rdf:resource="http://carz.air-nifty.com/sowhat/2013/10/pc-aa94.html" />
</rdf:Seq>
</items>

</channel>

<item rdf:about="http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-1137.html">
<title>AmigaOSのHDDジオメトリ (つづき)</title>
<link>http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-1137.html</link>
<description>AmigaOS4.1FEをエミュレータにインストールしてる内に、以前にゾンビ化し...</description>
<content:encoded><![CDATA[<p><a href="http://www.amigaos.net/">AmigaOS4.1FE</a>をエミュレータにインストールしてる内に、<a href="http://carz.air-nifty.com/sowhat/2009/05/amiga-62d9.html">以前</a>にゾンビ化したA4000TのHDDイメージ(HDFファイル)でもブートしてみたくなって、やろうとしたら上手くいかなかったのでメモ。</p>

<p>A4000Tでは、SCSIの4GBのHDDを使ってた。HDDイメージを作った際、手近に4GBのファイルを保存できるメディアが無かったのかどうか忘れてしまったけど、HDD全体をイメージ化したRDB(Rigid Disk Block)ファイルではなくパーティション毎にイメージ化したHDFファイルを作ってた。<br />AmigaOSは、HDDにアクセスする際、LBA(Logical Block Address)ではなくCHS(Cylinder, Head, Sector)アドレッシングを使うみたい(?)で、パーティションをマウントするにはこのCHSのジオメトリ情報が必要。しかし保存していたHDFファイルに、それら情報は添えられてなかった(ばか)。</p>

<p>SCSIって普通LBAぢゃないの？と思いながら、ジオメトリ情報をどこかに保存してないか探すけど見つからず…。<br /><a href="http://lallafa.de/blog/amiga-projects/amitools/xdftool/">xdftool</a>というHDFファイルの読み書きが出来るツールを作ってるヒト発見(<a href="https://github.com/cnvogelg/amitools">GitHub</a>)。<br />このツールがパーティションにアクセス出来るようなHead(Surface)数とSecter/trackを見つければいいんでは？と、それっぽいスクリプト書いて探ってみた。<br />昔触れていたATAの仕様が頭にあったのでHeadとSector/trackの最大値をそれぞれ15, 63にしてパラメータ振ってみたけど、バッチリな感じの数字は見つからず。ところどころファイル一覧くらいは見れる組合せはあったけど。</p>

<p>そうこうしている内に、昔のWinUAEの設定ファイルが見つかり見てみると…<br />
</p>
<div style="background: rgb(0, 0, 0); color: rgb(255, 255, 255); padding: 4px;">
<ul>
<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">572</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH0</span><span style="font-size: 0.6em;color: #ffa07a;">&quot; </span><span style="font-size: 0.6em;">(サイズ約200MB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">572</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約850MB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">3326</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約1GB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">3326</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH3</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約1GB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">3326</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH4</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約1GB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">3326</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH5</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約1GB)</span></li>

<li><span style="font-size: 0.6em;color: #eedd82;">blocksize</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">512</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">sectors</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">3326</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">reserved</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">2</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">surfaces</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">1</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #eedd82;">devicename</span><span style="font-size: 0.6em;">=</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #ffa07a;">DH6</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;"> (サイズ約200MB)</span></li></ul>
</div>
<p>…みたいな感じで予測は全然外れてた orz (そもそもHDDも4GBぢゃないみたい？)<br />Sector/track(sectors)もパーティションサイズに必ずしも比例していないようで。</p>

<p></p>

<div>今度からパーティション単位のイメージ作る時はCHSジオメトリも忘れずにメモります。</div>

<p></p>

<div><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2017/05/29/a4000tfusion50percent.png" class="mb"><img alt="A4000tfusion50percent" title="A4000tfusion50percent" src="http://carz.air-nifty.com/sowhat/images/2017/05/29/a4000tfusion50percent.png" width="100" height="62" border="0" style="margin: 0px 5px 5px 0px;" /></a>
<p>ご参考までに画像はmacOS Sierra→(Parallels)→Windows10→(WinUAE)→AmigaOS3.9→(Fusion)→MacOS8.1…と起動してみた様子。</p>
</div>

<div></div>
<p></p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>Amiga 関係</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2017-05-29T03:25:22+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-6342.html">
<title>AmigaOSのHDDジオメトリ (つづく…)</title>
<link>http://carz.air-nifty.com/sowhat/2017/05/amigaoshdd-6342.html</link>
<description>久し振りにアミガの記事というか、ここに書くの自体１年半振りくらいなのか（笑）。
...</description>
<content:encoded><![CDATA[<p>久し振りにアミガの記事というか、ここに書くの自体１年半振りくらいなのか（笑）。</p>

<p><a href="https://en.wikipedia.org/wiki/UAE_(emulator)">UAE</a>がPowerPCのエミュレートをサポートして、最新の<a href="http://www.amigaos.net/">AmigaOS4.1FE</a>(といっても4.1最初のリリースは2008年！)もインストール出来ると聞いて、早速Macの<a href="https://fs-uae.net/">FS-UAE</a>でインストールしてみた(遅)。インストール自体は<a href="http://amigax1000.blogspot.jp/2015/03/amigaos-41-fe-classic-on-fs-uae-2529.html">ココ</a>とか<a href="http://eab.abime.net/showthread.php?t=75132">ココ</a>とか参考に割りとスムーズに。 Cyberstorm PPCのROMは<a href="http://www.amigaforever.com/">Amiga Forever 2016</a>にあったけど、<a href="http://www.qemu.org/">QEMU</a>のPPCプラグイン<del>、Picasso IVのROM</del>は自分でダウンロード必要だった(入手先は前述のインストール手順のリンクにあり)。</p>

<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2017/05/23/installer_desktoptrimmed.png" class="mb"><img alt="Installer_desktoptrimmed" title="Installer_desktoptrimmed" src="http://carz.air-nifty.com/sowhat/images/2017/05/23/installer_desktoptrimmed.png" width="100" height="70" border="0" style="float: left; margin: 0px 5px 5px 0px;" /></a></p>

<p>あと、欲張ってAccelerator RAMやGraphics RAMを設定してたのがよくなかったらしく(?)、最初Picasso IVを上手く認識してくれず素のAmigaの解像度でインストーラが起動してた。インストール自体は問題なくできたぽかったけど。</p>
<br />
<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2017/05/23/amiupdate_3.png" class="mb"><img alt="Amiupdate_3" title="Amiupdate_3" src="http://carz.air-nifty.com/sowhat/images/2017/05/23/amiupdate_3.png" width="100" height="62" border="0" style="float: left; margin: 0px 5px 5px 0px;" /></a></p>

<p>因みにAmiga Forever 2016でもOS4.1のインストールをサポートしてるけど、最初、どの設定でもエミュレータが起動できなくて諦めてた。後から<a href="https://cloanto.com/">Cloanto</a>のサポートとやりとりして、Tempフォルダのパスに日本語が含まれてたのが原因だと分かり、取り敢えず使えるようになりますた。この問題は次のアップデートで修正されてるはず :-)<br />その後、FS-UAEでインストールしたHDDイメージからAmiga Foreverでも無事にブートを確認。</p>

<div></div>

<div></div>

<p>そして<a href="http://carz.air-nifty.com/sowhat/2009/05/amiga-62d9.html">以前</a>にゾンビ化したA4000TのHDDもOS4.1でマウントしたくなって、やろうとしたらうまくいかなかった事を書こうと書き始めたタイトルだったけど、疲れたので続きはまた明日にでも…前置きが長すぎて… orz</p>

<div>&nbsp;</div>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>Amiga 関係</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2017-05-23T03:15:03+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2015/10/firefox41-keysn.html">
<title>Firefox41 で .keysnail.js がエラーしてた件</title>
<link>http://carz.air-nifty.com/sowhat/2015/10/firefox41-keysn.html</link>
<description>多分 Firefox のバージョンが 41 になってから、 keysnail の...</description>
<content:encoded><![CDATA[<p>多分 Firefox のバージョンが 41 になってから、 <a href="https://github.com/mooz/keysnail/wiki/keysnail-japanese">keysnail</a> の設定ファイル <code>~/.keysnail.js</code> がエラーするようになって、やっぱり不便なので苦手な javascript のシンタックスを自分なりに調べて修正してみたメモ。</p>

<p><a class="mb" href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2015/10/12/dotkeysnailfix.png"><img width="200" height="94" border="0" src="http://carz.air-nifty.com/sowhat/images/2015/10/12/dotkeysnailfix.png" title="Dotkeysnailfix" alt="Dotkeysnailfix" style="float: none; margin: 0px 5px 5px 0px;" /></a>


<br /><br />ediffの画面、上が修正済、下がオリジナル。<br />keysnail の wiki にある<a href="https://github.com/mooz/keysnail/wiki/How-to-fix-errors-in-your-.keysnail.js-%28ja%29">修正方法</a>と若干違う気がするけど、きっと大丈夫…？<br /><br />今見ると、ちゃんと「エラーの対応ガイド見る」というボタンがあるのね。前はなかったような。このボタンを押すと前述の<a href="https://github.com/mooz/keysnail/wiki/How-to-fix-errors-in-your-.keysnail.js-%28ja%29">修正方法</a>へ飛べます。</p>

<p><a class="mb" href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2015/10/12/firefox41errormosaic.png"><img width="200" height="87" border="0" src="http://carz.air-nifty.com/sowhat/images/2015/10/12/firefox41errormosaic.png" title="Firefox41errormosaic" alt="Firefox41errormosaic" style="float: none; margin: 0px 5px 5px 0px;" /></a>
</p>

<p>
でも <code>let</code> 文が廃止されると、また修正必要になるのかな。</p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2015-10-12T03:17:44+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2015/01/post-c210.html">
<title>なす</title>
<link>http://carz.air-nifty.com/sowhat/2015/01/post-c210.html</link>
<description>写真その他の保存用 RAID1 ボリュームを運用していた Debian box ...</description>
<content:encoded><![CDATA[<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2015/01/26/psu.jpg" class="mb"><img width="80" height="142" border="0" alt="Psu" title="Psu" src="http://carz.air-nifty.com/sowhat/images/2015/01/26/psu.jpg" style="float: left; margin: 0px 5px 5px 0px;" /></a>写真その他の保存用 RAID1 ボリュームを運用していた <a href="http://carz.air-nifty.com/sowhat/2008/01/beryl_084a.html">Debian box</a> の電源がお亡くなりになったので、 安価な <a href="http://www.netgear.jp/products/details/RN10200.html">NAS</a> にしてみたメモ。</p>

<p>使い始めて数日後からキーンという高周波ノイズが気になりだした。ドライブがスピンダウンしている時にも鳴っている気がして、ファン？と思いこちらの<a href="http://y-naito.ddo.jp/index.php?id=1394860432">記事</a>を参考にファンの回転数を上げ下げしてみたけど音に変化なし。やっぱりドライブなのか。かれこれ４・５年は使ってる鴨。<br />あと同じサイトのこちらの<a href="http://y-naito.ddo.jp/index.php?categ=1&amp;year=&amp;month=12&amp;id=1386900487">記事</a>を参考に root での ssh アクセスを禁止したり。 ReadyNAS の記事が豊富で参考になります。有り難うございます。</p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2015-01-26T03:02:05+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2014/08/android-adb-bac.html">
<title>Android の adb backup から一部だけリストアしちゃー</title>
<link>http://carz.air-nifty.com/sowhat/2014/08/android-adb-bac.html</link>
<description>スマホ(Softbank 202F)が壊れて修理に出すことになって、出来る限りバ...</description>
<content:encoded><![CDATA[<p>スマホ(<a href="http://www.softbank.jp/mobile/product/smartphone/202f/">Softbank 202F</a>)が壊れて修理に出すことになって、出来る限りバックアップとっておこうと調べてみると、 <a href="http://developer.android.com/sdk/">Android SDK</a> に含まれる ADB を使用してバックアップ/リストアができるらしい。取り敢えず<a href="http://www.teradas.net/archives/6686/">こちらのサイト</a>などを参考にバックアップ。 <code>-apk -shared - all -system</code> のオプションでバックアップしたところ 15GB 程に…。念のため <code>-noapk -noshared -all -nosystem</code> のオプションでもバックアップしておく。これは 170MB 程。スマホは１週間程で戻ってきたけど、すぐにはリストアする時間がなく２日程使ってしまったので、リストア前にも後者のオプションで念のためバックアップ。</p>

<p>15GB のバックアップからのリストアは結構な時間がかかったけど、全てが元通りという訳ではなく、 Line がエラーして起動しなかったり Kobo, Sony Reader 等含めて本体にダウンロード済みのデータ(これらはマニュアルでバックアップ/リストアした)を認識してくれなかったり。修理で基盤交換とかしてるからなのか、そもそもバックアップが不完全なのか、それとも修理後しばらく使ってたのが悪かったのか。</p>

<p>修理後、おサイフケータイの再設定などはうっかり済ませてしまっていたけれど、どうせリストアで完全に元に戻らないのならと、これら設定を反映させるために修理後にとったバックアップも追加でリストアしてみた。<br />すると今度は「メモ帳」アプリのデータが消えてしまったので、取り敢えずそれだけは復活させたいと考えてみたメモ。前置き長すぎ(笑)。<br />因みに 202F の「メモ帳」アプリのパッケージは <code>com.fujitsu.kservice.fnotepad_3thm みたい。<br /></code></p>

<p>ADB バックアップデータと tar アーカイブを双方向に変換してくれるツールは既に存在するようで、<a href="http://nelenkov.blogspot.jp/2012/06/unpacking-android-backups.html">こちら</a>とか<a href="http://d.hatena.ne.jp/urandroid/20130612/1371016948">こちら</a>とかを参考にバックアップデータを tar に変換し展開することで特定のパッケージを取り出すことができた。ただ、これを再び tar にして ADB バックアップデータに変換する際には注意が必要そう。<br />tar にまとめる際にファイルを格納する順序(実際にはパッケージディレクトリ直下のサブディレクトリの順序のみ？)が正しくないと、ちゃんとリストアしてくれないみたい。また、 tar の中でファイルエントリの前にそのファイルを含むディレクトリだけのエントリがあってもダメみたい。でも空のディレクトリはあり…？とか。<br />バックアップファイルのフォーマット仕様書を見つけられなかったので、前述のサイトなどを斜め読みし色々試しつつ、 ADB バックアップデータから取り出した tar を展開して得られるディレクトリツリーから ADB バックアップファイルを作るスクリプトを書いてみた。「メモ帳」アプリのデータが復元できる事と、 Line を ADB バックアップ→ tar に変換＆展開→件のスクリプトで ADB バックアップファイル再構築→ ADB リストア→ ADB バックアップ…を行い、最初と最後の ADB バックアップファイルを tar に変換＆展開して同一のモノが得られることは確認…って分かるかな？(笑)。</p>

<p>前述のサイトにあるツールは python や java, perl で書かれてたけど、統一感無く ruby で(笑)。バックアップファイルから取り出した tar を展開すると apps というディレクトリができるので、この apps ディレクトリがあるディレクトリでスクリプトを実行すると apps 以下の内容を含むバックアップファイル生成。スクリプト実行前にリストアしたいパッケージを取捨選択しておく。ホントは元の tar を展開せずに直接必要な部分だけ取り出せればいいんだろうけど、<a href="#" onmousedown="if(document.getElementById('mkab_ruby_code').style.display == '')
　　　{document.getElementById('mkab_ruby_code').style.display = 'none';}
　else{document.getElementById('mkab_ruby_code').style.display = '';}">取り敢えず。</a></p>

<div id="mkab_ruby_code" style="display: none; width: 80%; padding: 8px; color: white; background-color: black;">
<pre><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;color: #ff4500;">!/usr/bin/ruby</span>
<span style="font-size: 0.6em;">require </span><span style="font-size: 0.6em;color: #ffa07a;">'zlib'</span><span style="font-size: 0.6em;">&nbsp;</span>

<span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">possible entries in a backup of a package
</span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">all except for _manifest are directories
</span><span style="font-size: 0.6em;color: #98fb98;">FILES2ADD</span><span style="font-size: 0.6em;"> = [
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;_manifest&quot;</span><span style="font-size: 0.6em;">,
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;a&quot;</span><span style="font-size: 0.6em;">,
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;r&quot;</span><span style="font-size: 0.6em;">,
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;f&quot;</span><span style="font-size: 0.6em;">,
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;db&quot;</span><span style="font-size: 0.6em;">,
&nbsp; </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;sp&quot;</span><span style="font-size: 0.6em;">,
]

</span><span style="font-size: 0.6em;color: #98fb98;">ABFILE</span><span style="font-size: 0.6em;"> = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;backup_</span><span style="font-size: 0.6em;color: #eedd82;">#{Time.now.strftime(&quot;%Y%m%d-%H%M%S&quot;)}</span><span style="font-size: 0.6em;color: #ffa07a;">.ab&quot;</span><span style="font-size: 0.6em;">&nbsp;</span>
<span style="font-size: 0.6em;color: #98fb98;">DIRPREFIX</span><span style="font-size: 0.6em;"> = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;apps&quot;</span><span style="font-size: 0.6em;">&nbsp;</span>
<span style="font-size: 0.6em;color: #98fb98;">TARCMD</span><span style="font-size: 0.6em;"> = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;tar -c -f - -T -&quot;</span><span style="font-size: 0.6em;">&nbsp;</span>
<span style="font-size: 0.6em;color: #98fb98;">ABHEAD</span><span style="font-size: 0.6em;"> = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;ANDROID BACKUP\x0a1\x0a1\x0anone\x0a&quot;</span><span style="font-size: 0.6em;">&nbsp;</span>
<span style="font-size: 0.6em;color: #98fb98;">BUFSIZE</span><span style="font-size: 0.6em;"> = 4096

</span><span style="font-size: 0.6em;color: #00ffff;">def</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #87cefa;">listFiles</span><span style="font-size: 0.6em;">(dir)
&nbsp; files = </span><span style="font-size: 0.6em;color: #98fb98;">Array</span><span style="font-size: 0.6em;">.new
&nbsp; </span><span style="font-size: 0.6em;color: #00ffff;">if</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">FileTest</span><span style="font-size: 0.6em;">.directory?(dir) </span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">dir is a directory ?
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">Dir</span><span style="font-size: 0.6em;">.glob(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{dir}</span><span style="font-size: 0.6em;color: #ffa07a;">/*&quot;</span><span style="font-size: 0.6em;">) { |entry|
&nbsp; &nbsp;&nbsp; &nbsp;files &lt;&lt; listFiles(entry)
&nbsp; &nbsp; }
&nbsp; &nbsp; files.flatten!
&nbsp; &nbsp; </span><span style="font-size: 0.6em;color: #00ffff;">unless</span><span style="font-size: 0.6em;"> files.length &gt; 0
&nbsp; &nbsp;&nbsp; &nbsp;files &lt;&lt; dir </span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">add if the dir was empty
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">else</span><span style="font-size: 0.6em;">
&nbsp; &nbsp; files &lt;&lt; dir </span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">dir was a file
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">return</span><span style="font-size: 0.6em;"> files
</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">

files = </span><span style="font-size: 0.6em;color: #98fb98;">Array</span><span style="font-size: 0.6em;">.new
</span><span style="font-size: 0.6em;color: #98fb98;">Dir</span><span style="font-size: 0.6em;">.glob(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{DIRPREFIX}</span><span style="font-size: 0.6em;color: #ffa07a;">/*&quot;</span><span style="font-size: 0.6em;">) { |dir|
&nbsp; </span><span style="font-size: 0.6em;color: #00ffff;">if</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">FileTest</span><span style="font-size: 0.6em;">.directory?(dir)
&nbsp; &nbsp; contents = </span><span style="font-size: 0.6em;color: #98fb98;">Dir</span><span style="font-size: 0.6em;">.glob(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{dir}</span><span style="font-size: 0.6em;color: #ffa07a;">/*&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp; </span><span style="font-size: 0.6em;color: #98fb98;">FILES2ADD</span><span style="font-size: 0.6em;">.each { |file|
&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">if</span><span style="font-size: 0.6em;"> contents.include?(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{dir}</span><span style="font-size: 0.6em;color: #ffa07a;">/</span><span style="font-size: 0.6em;color: #eedd82;">#{file}</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; files &lt;&lt; listFiles(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{dir}</span><span style="font-size: 0.6em;color: #ffa07a;">/</span><span style="font-size: 0.6em;color: #eedd82;">#{file}</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; contents.delete(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;color: #eedd82;">#{dir}</span><span style="font-size: 0.6em;color: #ffa07a;">/</span><span style="font-size: 0.6em;color: #eedd82;">#{file}</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">
&nbsp; &nbsp; }
 </span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">check if unknown path exists in the backup
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">if</span><span style="font-size: 0.6em;"> contents.length &gt; 0
&nbsp; &nbsp;&nbsp; &nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">STDERR</span><span style="font-size: 0.6em;">.puts(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;Unknown path in the backup !!&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp;&nbsp; &nbsp;contents.each { |path|
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; </span><span style="font-size: 0.6em;color: #98fb98;">STDERR</span><span style="font-size: 0.6em;">.puts(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;&nbsp; </span><span style="font-size: 0.6em;color: #eedd82;">#{path}</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp;&nbsp; &nbsp;}
&nbsp; &nbsp;&nbsp; &nbsp;exit(</span><span style="font-size: 0.6em;color: #eedd82;">false</span><span style="font-size: 0.6em;color: #ff4500;"> # error !!
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">
}
files.flatten!

</span><span style="font-size: 0.6em;color: #ff4500;">#</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #ff4500;">output data as .ab format(?)
</span><span style="font-size: 0.6em;">readbuf = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">File</span><span style="font-size: 0.6em;">.open(</span><span style="font-size: 0.6em;color: #98fb98;">ABFILE</span><span style="font-size: 0.6em;">, </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;w&quot;</span><span style="font-size: 0.6em;">) { |file|
&nbsp; file.write(</span><span style="font-size: 0.6em;color: #98fb98;">ABHEAD</span><span style="font-size: 0.6em;">)</span><span style="font-size: 0.6em;color: #ff4500;"> # header
</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #98fb98;">IO</span><span style="font-size: 0.6em;">.popen(</span><span style="font-size: 0.6em;color: #98fb98;">TARCMD</span><span style="font-size: 0.6em;">, </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;r+&quot;</span><span style="font-size: 0.6em;">) { |io|
&nbsp; &nbsp; io.write(files.join(</span><span style="font-size: 0.6em;color: #ffa07a;">&quot;\n&quot;</span><span style="font-size: 0.6em;">))
&nbsp; &nbsp; io.close_write
&nbsp; &nbsp; z = </span><span style="font-size: 0.6em;color: #98fb98;">Zlib</span><span style="font-size: 0.6em;">::</span><span style="font-size: 0.6em;color: #98fb98;">Deflate</span><span style="font-size: 0.6em;">.new(</span><span style="font-size: 0.6em;color: #98fb98;">Zlib</span><span style="font-size: 0.6em;">::</span><span style="font-size: 0.6em;color: #98fb98;">BEST_COMPRESSION</span><span style="font-size: 0.6em;">)
&nbsp; &nbsp; outbuf = </span><span style="font-size: 0.6em;color: #ffa07a;">&quot;&quot;</span><span style="font-size: 0.6em;">&nbsp;</span><span style="font-size: 0.6em;color: #00ffff;">while</span><span style="font-size: 0.6em;"> io.read(</span><span style="font-size: 0.6em;color: #98fb98;">BUFSIZE</span><span style="font-size: 0.6em;">, readbuf)
&nbsp; &nbsp;&nbsp; &nbsp;outbuf = z.deflate(readbuf)
&nbsp; &nbsp;&nbsp; &nbsp;file.write(outbuf)
&nbsp; &nbsp; </span><span style="font-size: 0.6em;color: #00ffff;">end</span><span style="font-size: 0.6em;">
&nbsp; &nbsp; file.write(z.finish)
&nbsp; &nbsp; z.close
&nbsp; }
}</span></pre>
</div>

<p>全てが元通りではないけれど、ひと通りリストアが終わったところで、ふと「ギャラリー」を開くと…え、修理に出してる間に代替機で撮影した写真がない！保存先は microSD にしてたはずなのに…と途方に暮れつつ「ギャラリー」アプリのデータを削除してスマホを再起動すると、「 SD カードをスキャンしています」的なメッセージの後、無事に全ての写真が表示されますた。</p>

<p>あ、スクリプトは OSX 10.9.4, ruby 2.0.0p451で動作確認。スクリプト内部で tar コマンド呼び出したりパイプ使ったりしてるので、 Unix 系システムがよさげ。</p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>携帯・デジカメ</dc:subject>
<dc:subject>スクリプティング</dc:subject>
<dc:subject>Mac 関係</dc:subject>
<dc:subject>Android とか</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2014-08-22T03:23:31+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2014/05/post-2484.html">
<title>クレーンゲームでとったトイデジからの写真取り込みとか</title>
<link>http://carz.air-nifty.com/sowhat/2014/05/post-2484.html</link>
<description>小学生の娘が自分用のデジカメが欲しいというので、そう言えば昔クレーンゲームでとっ...</description>
<content:encoded><![CDATA[<p>小学生の娘が自分用のデジカメが欲しいというので、そう言えば昔クレーンゲームでとったのがあるよと出してきたはいいけど、 PC に接続して写真を取り出すためのアプリが入ってた CD を処分してしまっていたので何とかしたメモ。</p>

<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2014/05/22/img_20140519_01_34_33_xga_2.jpg" class="mb"><img width="100" height="56" border="0" alt="Img_20140519_01_34_33_xga_2" title="Img_20140519_01_34_33_xga_2" src="http://carz.air-nifty.com/sowhat/images/2014/05/22/img_20140519_01_34_33_xga_2.jpg" style="float: left; margin: 0px 5px 5px 0px; cursor: url(&quot;chrome://thumbnailzoomplus/skin/images/tzp-cursor.gif&quot;), crosshair;" /></a>


</p>

<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2014/05/22/digicamusb_2.jpg" class="mb"><img width="75" height="56" border="0" alt="Digicamusb_2" title="Digicamusb_2" src="http://carz.air-nifty.com/sowhat/images/2014/05/22/digicamusb_2.jpg" style="float: left; margin: 0px 5px 5px 0px;" /></a>


</p>

<p>デジカメ本体はこんな感じ。本体には D:X DIGITAL とか DIGITAL CAMERA とか USB とか(笑)しか表示がなくて、ネットを色々探してみたけれど使えそうなアプリは見つけられず。 USB ケーブルを接続する端子も特殊？な感じだけどケーブルは奇跡的に発見。</p>

<p> Linux に繋げて lsusb してみると…<br />
</p>

<div style="width: 80%; color: white; background: none repeat scroll 0% 0% black; padding: 8px;"><span style="font-size: 0.8em;"><code>Bus 001 Device 006: ID 0979:0227 Jeilin Technology Corp., Ltd JL2005B/C/D Toy Camera</code></span></div>

<p>
という表示。更にこれを手掛かりに探してみると、 <a href="http://www.gphoto.org/">gphoto</a> を使うとカメラ内の写真を取り出せるっぽい！</p>

<p>早速 <a href="https://www.macports.org/">MacPorts</a> で gphoto2 をインストールするけど、どうも最近 MacPorts でのインストールやアップグレードが失敗するなぁと少し調べてみると、どうも<a href="https://trac.macports.org/wiki/Migration">こういうこと</a>みたい。確かに Mavericks にしてから鴨。これまでバータリーに対処してきたのは無駄だったのね。 <a href="http://brew.sh/index_ja.html">Homebrew</a> だとこんなことないのかな？ 取り敢えず手順通りに実行すると確かにエラーは出なくなったけど、やたらと時間がかかる。かかり過ぎる。<a href="http://home.kaspersky.co.jp/store/kasperjp/ja_JP/pd/productID.286479100">カペルスキーインターネットセキュリティっ</a>て奴を入れてから色々かなり重たくなってる実感があったので、試しにこれを無効にしてみると100倍速くなりますた。あくまで体感(笑)。 <a href="http://www.parallels.com/jp/">Parallels</a> にバンドルされてたから使ってみてたけど、これを機会にサイナラします…。</p>

<p><a href="http://carz.air-nifty.com/.shared/image.html?/photos/uncategorized/2014/05/22/20140522_042716.png" class="mb"><img width="100" height="55" border="0" alt="20140522_042716" title="20140522_042716" src="http://carz.air-nifty.com/sowhat/images/2014/05/22/20140522_042716.png" style="float: left; margin: 0px 5px 5px 0px;" /></a>gphoto2 を使ってコマンドラインから写真の取出しや削除ができる事は確認できたけど、さすがに小学生の娘にターミナルからコマンド入力させるのもアレなので簡単な GUI を Ruby/Tk でテキトーにこんな感じに。やっぱりマルチスレッドにするべきかなぁと直しかけたけど、使えないこともなさげなのでそのままに。やっつけなコードを恥ずかしながら<a href="#" onmousedown="if(document.getElementById('ruby_code').style.display == '')
　　　{document.getElementById('ruby_code').style.display = 'none';}
　else{document.getElementById('ruby_code').style.display = '';}">置いときます</a>。プログレスバーつけようとして志半ばな残骸もそのままに。あ、 gphoto2 と ppmtojpeg を内部で呼び出してます。あとは <a href="http://ja.wikipedia.org/wiki/Automator">Automator</a> を使ってアプリっぽく起動できるようにして出来上がり。

</p>

<p></p>
<p></p>

<div id="ruby_code" style="display: none; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0); font-size: x-small;">
&nbsp; &nbsp; <pre><span style="color: #ff4500;">#</span><span style="color: #ff4500;">!/usr/bin/env ruby
</span><span style="color: #ff4500;"># </span><span style="color: #ff4500;">-*- coding: utf-8 -*-
</span>
<span style="color: #ff4500;"># </span><span style="color: #ff4500;">tiny script to get all files from a JL2005B based toy camera
</span>
require <span style="color: #ffa07a;">&quot;tk&quot;</span>
require <span style="color: #ffa07a;">&quot;tkextlib/bwidget&quot;</span>
require <span style="color: #ffa07a;">&quot;fileutils&quot;</span>
require <span style="color: #ffa07a;">&quot;open3&quot;</span>

<span style="color: #98fb98;">CmdDetectCamera</span>&nbsp; &nbsp;= <span style="color: #ffa07a;">&quot;/opt/local/bin/gphoto2 --auto-detect&quot;</span>
<span style="color: #98fb98;">ValidCameraRegexp</span> = <span style="color: #ffa07a;">/^ JL2005B/</span>
<span style="color: #98fb98;">CmdListFiles</span>&nbsp; &nbsp;&nbsp; &nbsp;= <span style="color: #ffa07a;">&quot;/opt/local/bin/gphoto2 -L&quot;</span>
<span style="color: #98fb98;">FileListRegexp</span>&nbsp; &nbsp; = <span style="color: #ffa07a;">/^#(\d+)\s+(jl_\d+)\.ppm/</span>
<span style="color: #98fb98;">CmdCountFiles</span>&nbsp; &nbsp;&nbsp; = <span style="color: #ffa07a;">&quot;/opt/local/bin/gphoto2 -n&quot;</span>
<span style="color: #98fb98;">FileCountRegexp</span>&nbsp; &nbsp;= <span style="color: #ffa07a;">/^Number of files.+:\s*(\d+)$/</span>
<span style="color: #98fb98;">CmdDelAllFiles</span>&nbsp; &nbsp; = <span style="color: #ffa07a;">&quot;/opt/local/bin/gphoto2 -D&quot;</span> <span style="color: #ff4500;"># </span><span style="color: #ff4500;">the camera does not support indivisual file deletion
</span><span style="color: #98fb98;">CmdGetPicAsJpg</span>&nbsp; &nbsp; = <span style="color: #ffa07a;">&quot;/opt/local/bin/gphoto2 --stdout -p %d | /opt/local/bin/ppmtojpeg &gt; %s.jpg&quot;</span>

<span style="color: #98fb98;">ENV</span>[<span style="color: #ffa07a;">&quot;LC_ALL&quot;</span>] = <span style="color: #ffa07a;">&quot;C&quot;</span>

<span style="color: #98fb98;">HomeDir</span>&nbsp; &nbsp;= <span style="color: #98fb98;">ENV</span>[<span style="color: #ffa07a;">&quot;HOME&quot;</span>]
<span style="color: #98fb98;">CameraDir</span> = <span style="color: #ffa07a;">&quot;</span><span style="color: #eedd82;">#{HomeDir}</span><span style="color: #ffa07a;">/Documents/Camera&quot;</span>

<span style="color: #98fb98;">TkOption</span>.add <span style="color: #ffa07a;">'*font'</span>, <span style="color: #ffa07a;">'Wawati\ SC 18'</span>

<span style="color: #00ffff;">class</span> <span style="color: #98fb98;">MainView</span>
&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">initialize</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@root</span> = <span style="color: #98fb98;">TkRoot</span>.new <span style="color: #00ffff;">do</span>
&nbsp; &nbsp;&nbsp; &nbsp;title <span style="color: #ffa07a;">&quot;写真取り込み&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;minsize 300, 20
&nbsp; &nbsp;&nbsp; &nbsp;attributes <span style="color: #ffa07a;">&quot;topmost&quot;</span>, 1
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;">build GUI
</span>&nbsp; &nbsp; <span style="color: #eedd82;">@btnChk</span> = <span style="color: #98fb98;">TkButton</span>.new(<span style="color: #eedd82;">@root</span>) <span style="color: #00ffff;">do</span>
&nbsp; &nbsp;&nbsp; &nbsp;text <span style="color: #ffa07a;">&quot;カメラチェック&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;pack(<span style="color: #ffa07a;">&quot;side&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;top&quot;</span>,&nbsp; <span style="color: #ffa07a;">&quot;padx&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;2&quot;</span>, <span style="color: #ffa07a;">&quot;pady&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;2&quot;</span>, <span style="color: #ffa07a;">&quot;fill&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;both&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;focus
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@btnGet</span> = <span style="color: #98fb98;">TkButton</span>.new(<span style="color: #eedd82;">@root</span>) <span style="color: #00ffff;">do</span>
&nbsp; &nbsp;&nbsp; &nbsp;text <span style="color: #ffa07a;">&quot;全部取り込む&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;state <span style="color: #ffa07a;">&quot;disabled&quot;</span>
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@btnDel</span> = <span style="color: #98fb98;">TkButton</span>.new(<span style="color: #eedd82;">@root</span>) <span style="color: #00ffff;">do</span>
&nbsp; &nbsp;&nbsp; &nbsp;text <span style="color: #ffa07a;">&quot;全部消す&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;state <span style="color: #ffa07a;">&quot;disabled&quot;</span>
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@stsLabel</span> = <span style="color: #98fb98;">TkLabel</span>.new(<span style="color: #eedd82;">@root</span>) <span style="color: #00ffff;">do</span>
&nbsp; &nbsp;&nbsp; &nbsp;text <span style="color: #ffa07a;">&quot;&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;state <span style="color: #ffa07a;">&quot;normal&quot;</span>
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
<span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">@pgsVar = TkVariable.new
</span><span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">@pgsBar = Tk::BWidget::ProgressBar.new(@root) do
</span><span style="color: #ff4500;">#&nbsp; &nbsp;&nbsp; </span><span style="color: #ff4500;">variable @pgsVar
</span><span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">end
</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@btnChk</span>.command( proc {<span style="color: #eedd82;">self</span>.checkCamera} )
&nbsp; &nbsp; <span style="color: #eedd82;">@btnGet</span>.command( proc {<span style="color: #eedd82;">self</span>.getAllPix}&nbsp; &nbsp;)
&nbsp; &nbsp; <span style="color: #eedd82;">@btnDel</span>.command( proc {<span style="color: #eedd82;">self</span>.delAllPix}&nbsp; &nbsp;)
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.centerWindow()
&nbsp; &nbsp; <span style="color: #eedd82;">@btnChk</span>.focus()
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">packChild</span>(child)
&nbsp; &nbsp; child.pack(<span style="color: #ffa07a;">&quot;side&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;top&quot;</span>,&nbsp; <span style="color: #ffa07a;">&quot;padx&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;2&quot;</span>, <span style="color: #ffa07a;">&quot;pady&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;2&quot;</span>, <span style="color: #ffa07a;">&quot;fill&quot;</span> =&gt; <span style="color: #ffa07a;">&quot;both&quot;</span>)
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">unpackChild</span>(child)
&nbsp; &nbsp; child.unpack()
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">centerWindow</span>
&nbsp; &nbsp; x = <span style="color: #eedd82;">@root</span>.winfo_screenwidth()/2 - <span style="color: #eedd82;">@root</span>.winfo_width()/2
&nbsp; &nbsp; y = <span style="color: #eedd82;">@root</span>.winfo_screenheight()/2 - <span style="color: #eedd82;">@root</span>.winfo_height()/2
&nbsp; &nbsp; <span style="color: #eedd82;">@root</span>.geometry(<span style="color: #ffa07a;">&quot;+%d+%d&quot;</span> % [x, y])
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">messageBox</span>(type, icon, title, message)
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;type&quot;</span>&nbsp; &nbsp; =&gt; type,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;icon&quot;</span>&nbsp; &nbsp; =&gt; icon,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;title&quot;</span>&nbsp; &nbsp;=&gt; title,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;message&quot;</span> =&gt; message
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;)
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">checkCamera</span>
<span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">self.unpackChild(@pgsBar)
</span>&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.unpackChild(<span style="color: #eedd82;">@stsLabel</span>)
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.unpackChild(<span style="color: #eedd82;">@btnDel</span>)
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.unpackChild(<span style="color: #eedd82;">@btnGet</span>)
&nbsp; &nbsp; stdin, stdout, stderr, thread = <span style="color: #98fb98;">Open3</span>.popen3(<span style="color: #98fb98;">CmdDetectCamera</span>)
&nbsp; &nbsp; stdin.close
&nbsp; &nbsp; stdout.each { |line|
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">if</span> line =~ <span style="color: #98fb98;">ValidCameraRegexp</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;info&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;OK&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;サポートしているカメラが見つかりました。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.packChild(<span style="color: #eedd82;">@btnGet</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.packChild(<span style="color: #eedd82;">@btnDel</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.packChild(<span style="color: #eedd82;">@stsLabel</span>)
<span style="color: #ff4500;">#&nbsp; &nbsp;&nbsp; &nbsp; </span><span style="color: #ff4500;">self.packChild(@pgsBar)
</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;normal&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;処理を選んでください。&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #00ffff;">return</span>
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">end</span>
&nbsp; &nbsp; }
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;error&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;エラー&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;サポートしているカメラが見つかりませんでした。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; )
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;"># http://stackoverflow.com/questions/5781286/tkinter-how-do-widgets-update
</span>&nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;">def doPrintLabelSlowly(label, message)
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">text = label.text
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">text &lt;&lt; message[0]
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">label.text(text)
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">if message.length &gt; 1
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;&nbsp; </span><span style="color: #ff4500;">self.doPrintLabelSlowly(label, message[1 .. message.length])
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">end
</span>&nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;">end
</span>&nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;">def setLabel(label, message)
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">label.text = &quot;&quot;
</span>&nbsp; <span style="color: #ff4500;">#&nbsp; &nbsp;</span><span style="color: #ff4500;">self.doPrintLabelSlowly(label, message) if message.length &gt; 0
</span>&nbsp; <span style="color: #ff4500;"># </span><span style="color: #ff4500;">end
</span>
&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">getAllPix</span>
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;disabled&quot;</span>)
&nbsp; &nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;カメラ内の写真をチェック中…&quot;</span>)
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp; stdin, stdout, stderr, thread = <span style="color: #98fb98;">Open3</span>.popen3(<span style="color: #98fb98;">CmdListFiles</span>)
&nbsp; &nbsp; stdin.close
&nbsp; &nbsp; files = <span style="color: #98fb98;">Array</span>.new
&nbsp; &nbsp; stdout.each { |line|
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">if</span> line =~ <span style="color: #98fb98;">FileListRegexp</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; num, file = [<span style="color: #98fb98;">Regexp</span>.last_match(1), <span style="color: #98fb98;">Regexp</span>.last_match(2)]
<span style="color: #ff4500;">#&nbsp; &nbsp;&nbsp; &nbsp; </span><span style="color: #ff4500;">puts &quot;</span><span style="color: #eedd82;">#{num}</span><span style="color: #ff4500;">&nbsp;</span><span style="color: #eedd82;">#{file}</span><span style="color: #ff4500;">&quot;
</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; files &lt;&lt; [num, file]
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">end</span>
&nbsp; &nbsp; }
&nbsp; &nbsp; stdin, stdout, stderr, thread = <span style="color: #98fb98;">Open3</span>.popen3(<span style="color: #98fb98;">CmdCountFiles</span>)
&nbsp; &nbsp; stdin.close
&nbsp; &nbsp; count = 0
&nbsp; &nbsp; stdout.each {|line|
&nbsp; &nbsp;&nbsp; &nbsp;count = <span style="color: #98fb98;">Regexp</span>.last_match(1).to_i <span style="color: #00ffff;">if</span> line =~ <span style="color: #98fb98;">FileCountRegexp</span>
&nbsp; &nbsp; }
&nbsp; &nbsp; <span style="color: #00ffff;">if</span> count == files.length
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">if</span> count &gt; 0
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;%d 枚の写真が見つかりました。&quot;</span> % [count])
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; dateTime&nbsp; = <span style="color: #98fb98;">Time</span>.now.strftime(<span style="color: #ffa07a;">&quot;%Y%m%d-%H%M%S&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; picDir&nbsp; &nbsp; = <span style="color: #ffa07a;">&quot;</span><span style="color: #eedd82;">#{CameraDir}</span><span style="color: #ffa07a;">/</span><span style="color: #eedd82;">#{dateTime}</span><span style="color: #ffa07a;">&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; dir = <span style="color: #98fb98;">FileUtils</span>.mkpath(picDir).shift
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Dir</span>.chdir(dir) { |dir|
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; files.each {|file|
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;stdin, stdout, stderr, thread = <span style="color: #98fb98;">Open3</span>.popen3(<span style="color: #98fb98;">CmdGetPicAsJpg</span> % file)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;stdin.close
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">if</span> thread.value.exitstatus != 0
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;error&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;エラー&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;</span><span style="color: #eedd82;">#{file[0]}</span><span style="color: #ffa07a;"> 枚目の写真の取得に失敗しました。\n全ての処理が終わってからもう一度試してみてください。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; count -= 1 <span style="color: #ff4500;"># </span><span style="color: #ff4500;">failed
</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">else</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;</span><span style="color: #eedd82;">#{file[0]}</span><span style="color: #ffa07a;"> 枚目の写真を取り込みました。&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">end</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; }
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;info&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;OK&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;写真 </span><span style="color: #eedd82;">#{count}</span><span style="color: #ffa07a;"> 枚の取り込みに成功しました。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;normal&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;</span><span style="color: #eedd82;">#{count}</span><span style="color: #ffa07a;"> 枚の写真を取り込みました。&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #00ffff;">return</span>
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">else</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;info&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;OK&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #ffa07a;">&quot;写真が一枚もありませんでした。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;normal&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;写真が一枚もありませんでした。&quot;</span>)
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #00ffff;">return</span>
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;error&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;エラー&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #ffa07a;">&quot;カメラ内の写真の確認に失敗しました。\nもう一度やり直してみてください。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; )
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;normal&quot;</span>)
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp; <span style="color: #00ffff;">return</span>
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">delAllPix</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;全ての写真を削除します。&quot;</span>)
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;disabled&quot;</span>)
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; &nbsp; stdin, stdout, stderr, thread = <span style="color: #98fb98;">Open3</span>.popen3(<span style="color: #98fb98;">CmdDelAllFiles</span>)
&nbsp; &nbsp; stdin.close
&nbsp; &nbsp; <span style="color: #00ffff;">if</span> thread.value.exitstatus != 0
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;error&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;エラー&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;写真の削除に失敗しました。\nもう一度試してみてください。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; )
&nbsp; &nbsp; <span style="color: #00ffff;">else</span>
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #eedd82;">self</span>.messageBox(
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;ok&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;info&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;OK&quot;</span>,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #ffa07a;">&quot;全ての写真を削除しました。&quot;</span>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; )
&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #eedd82;">@stsLabel</span>.text(<span style="color: #ffa07a;">&quot;全ての写真を削除しました。&quot;</span>)
&nbsp; &nbsp; <span style="color: #00ffff;">end</span>
&nbsp; &nbsp; <span style="color: #eedd82;">self</span>.toggleButtons(<span style="color: #ffa07a;">&quot;normal&quot;</span>)
&nbsp; &nbsp; <span style="color: #98fb98;">Tk</span>.update
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">toggleButtons</span>(state)
&nbsp; &nbsp; <span style="color: #eedd82;">@btnChk</span>.state(state)
&nbsp; &nbsp; <span style="color: #eedd82;">@btnGet</span>.state(state)
&nbsp; &nbsp; <span style="color: #eedd82;">@btnDel</span>.state(state)
&nbsp; <span style="color: #00ffff;">end</span>

&nbsp; <span style="color: #00ffff;">def</span> <span style="color: #87cefa;">mainloop</span>
&nbsp; &nbsp; <span style="color: #eedd82;">@root</span>.mainloop
&nbsp; <span style="color: #00ffff;">end</span>
<span style="color: #00ffff;">end</span>

view = <span style="color: #98fb98;">MainView</span>.new
view.mainloop()
</pre>
</div>
]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>携帯・デジカメ</dc:subject>
<dc:subject>Mac 関係</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2014-05-23T00:46:38+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2013/12/ntemacs-tramp-s.html">
<title>NTEmacs で tramp (ssh) 設定とか</title>
<link>http://carz.air-nifty.com/sowhat/2013/12/ntemacs-tramp-s.html</link>
<description>Meadow だった頃から使っている .emacs の設定では、リモートサーバー...</description>
<content:encoded><![CDATA[<p><a href="http://www.meadowy.org/meadow/">Meadow</a> だった頃から使っている .emacs の設定では、リモートサーバー上のファイルを ange-ftp (tramp) で編集できてたけど、ある日会社の Solaris なサーバーにアクセスしようとするとタイムアウトしてしまった。あれこれ試して「もしや？」と McAfee のログを見てみると案の定 ftp.exe をブロックしましたと。再び「<a href="http://carz.air-nifty.com/sowhat/2009/04/mew-thunderbird.html">もしや？</a>」と ftp.exe を別名でコピーして試してみたけどダメだったので、ポートを塞がれれたのか。でも会社標準(?) ftp クライアントの <a href="http://sourceforge.jp/projects/filezilla/">Filezilla</a> では問題なさそう。 PASV モードだと大丈夫ぽいけど、サーバーによっては PASV モードを拒否するようで使えない。</p>

<p>結局、<a href="http://skalldan.wordpress.com/2012/05/24/ntemacs-tramp-mode-on-windows7/">こちら</a>のページなどを参考に PuTTY の plink を使うよう tramp の設定を変更。最初エラー(詳細忘れた)してうまく動かなかったけど、<a href="http://stackoverflow.com/questions/15540223/emacs-24-3-for-windows-tramp-byte-code-couldnt-find-a-proper-ls-command">こちら</a>のページを参考に <code>tramp-sh.el をバイトコンパイルし直して、 tramp のキャッシュ(</code><code><code>~/.emacs.d/tramp</code>)を削除する事で使えるようになった。キャッシュの削除は Emacs を終了して行わないとダメみたい。<br /><br />色々調べてる内、 NTEmacs のショートカットに AppID を設定する<a href="http://tasogare66.blog.fc2.com/blog-entry-52.html">方法</a>など見つけて少しだけ快適に。自分の環境では runemacs.exe ではなく Cygwin の run.exe で emacs.exe (<a href="http://carz.air-nifty.com/sowhat/2009/04/mew-thunderbird.html">を outlook.exe にリネームした</a>モノ)を起動しているけど、あくまでショートカットに AppID を設定するので関係ないみたい。<br /><br /></code></p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>Emacsen</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2013-12-21T20:51:20+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2013/12/auto-dial-10-wo.html">
<title>Auto Dial 10 works with FF 25.0.1 :-)</title>
<link>http://carz.air-nifty.com/sowhat/2013/12/auto-dial-10-wo.html</link>
<description>いつからか(きっと Firefox が 24.0 になったくらいから)ちゃんと使...</description>
<content:encoded><![CDATA[<p>いつからか(きっと Firefox が 24.0 になったくらいから)ちゃんと使えなくなってた <a href="https://addons.mozilla.org/ja/firefox/addon/auto-dial/">Auto Dial</a> という Firefox のアドオンをやっぱり使いたいと少し調べたら使えたっぽいのでメモ。</p>

<p>このアドオンは、よく見るサイトへのリンクをその頻度の高い順に並べて新しいタブの画面に表示してくれるというモノ。最近の Firefox では標準で似たような機能が実装されてるけど、慣れもあってか Auto Dial の方が使いやすい。</p>

<p>Auto Dial のレビューにも、 Firefox 24.0 で新しいタブを開くとたまにしか Auto Dial の画面が表示されないと書いてあり、確かにそんな感じ。<br />やっぱり使えないと不便だなと少し調べてみたら… Firefox 側の設定を変更すると使えるっぽい。</p>

<p><img border="0" alt="Browsernewtabpreload_3" title="Browsernewtabpreload_3" src="http://carz.air-nifty.com/photos/uncategorized/2013/12/01/browsernewtabpreload_3.png" />


<br />


</p>

<p></p>

<p>ロケーションバーに about:config と入力して現れる設定項目の <code>browser.newtab.preload</code> という項目を false にするといいみたい。これは恐らく標準の新しいタブの画面に表示されるサムネイルの為の設定かな(？)。だとしたら、これが何故効くのかは謎だけど。</p>

<p>因みに標準の新しいタブの画面に表示されるサムネイルの数が少なすぎる…とも思ってたけど、これも同様に about:config にある項目：<br /><code>browser.newtabpage.columns<br />browser.newtabpage.rows</code><br />…で調整できるみたい。</p>

<p>Auto Dial は、各サイトへのリンクに対応する番号(リンクの画面上の位置によって決まる)をタイプすることでもジャンプできるけど、数が多くなると先頭から数えないと番号がわからなくなるのが難点(笑)。あとインクリメンタルサーチで絞り込む機能とかあったら嬉しい鴨。</p>


]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2013-12-01T05:22:00+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2013/11/outlook-emacs-9.html">
<title>Outlook で Emacs なキーバインド</title>
<link>http://carz.air-nifty.com/sowhat/2013/11/outlook-emacs-9.html</link>
<description>これまで会社の Windows PC では、 NTEmacs + mew, Cy...</description>
<content:encoded><![CDATA[<p>これまで会社の Windows PC では、 <a href="http://sourceforge.jp/projects/ntemacsjp/">NTEmacs</a> + <a href="http://www.mew.org/ja/">mew</a>, <a href="http://cygwin.com/">Cygwin</a>, <a href="http://www.mozilla.jp/firefox/">Firefox</a> + <a href="https://github.com/mooz/keysnail/wiki/keysnail-japanese">KeySnail</a> と <a href="http://www.google.co.jp/ime/">Google日本語入力</a>を「ことえり」ベースのキーマップで使って、それなりに平穏な日々を送っていました。…が、周囲は html メールがメインでさすがに最近は mew では厳しさを感じます。<br />html メールを引用、 plain text で返信してメールのフォーマットを崩してしまうのが心苦しい時があるのです。</p>

<p>会社の標準メールクライアントは Outlook です。これが mew ライクなキーバインドで使えるようになれば…と調べてみたメモ。</p>

<p>最初に参考にしたのが<a href="http://blogs.adobe.com/silverman/2012/04/15/setting-up-emacs-key-mappings-on-windows-outlook/">ココ</a>。因みにココの <a href="http://www.autohotkey.com/">AutoHotkey</a> 用のコードはヘルプに載ってるサンプルコードの関数 ActiveControlIsOfClass() をどこかで定義してあげないとエラーします。あとメール作成時に大文字 F が入力できなかったので &quot;+f&quot; で始まる行を削除しました。(+f = Shift + f の意)<br />AutoHotkey 今まで知りませんでしたが、かなり色々できそうですねー。</p>

<p>結局、今のところ<a href="http://www49.atwiki.jp/ntemacs/pages/20.html">コチラ</a>で戴いたスクリプトと併せて少しカスタマイズしつつ全体的に Emacs なキーバインドにしてみてますが、まだ期待と違う動きになるところがあったり既に使い慣れてる Windows なショートカットと衝突したりで模索中です。</p>

<p>Windows のショートカットキーは Ctrl キーとの組み合わせになってる場合が多いので、どうしてもぶつかっちゃいますね。その点 OSX は編集場面での Emacs ライクなキーバインドと、コマンドキーとの組合せがメインな標準的なショートカットキーがうまく共存できてて使いやすいなーと改めて思います。</p>

<p></p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>
<dc:subject>Emacsen</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2013-11-27T02:13:49+09:00</dc:date>
</item>
<item rdf:about="http://carz.air-nifty.com/sowhat/2013/10/pc-aa94.html">
<title>会社 PC の入替えとか(３年５ヶ月鰤)</title>
<link>http://carz.air-nifty.com/sowhat/2013/10/pc-aa94.html</link>
<description>つひこないだ交換したばっかりな気がしてた Lenovo T400 が、実は３年半...</description>
<content:encoded><![CDATA[<p>つひこないだ交換したばっかりな気がしてた <a href="http://shopap.lenovo.com/jp/notebooks/thinkpad/t-series/t400/">Lenovo T400</a> が、実は３年半も使ってたと気づいて驚きました。どうりでキーボードも擦り減るわけね。</p>

<p>新しい PC は HP 製になりました。<br />古い PC から新しい PC に環境を移す訳ですが、会社入って最初に貰った PC では C: ドライブ直下にフォルダを作れたのに、途中からアクセス権を奪われてしまい、そのままでは同じパスにファイルが移動できずに何かと不便です。そのパスにそのファイルがある前提の環境になってたりするもので。<br />なので、新しい PC を貰ったら先ず、一時的に管理者権限を行使させて戴き C: ドライブ直下にフォルダを作ることから始める必要がでてきました。<br />せっかくなのでついでにキーボードの Ctrl と Caps を入替えたり、 <a href="http://www.google.co.jp/ime/">Google 日本語入力</a>を入れたりはするけれど権限の悪用はしません。自由には責任が伴います。</p>

<p>で、いつもは取り敢えず <a href="http://www.risec.aist.go.jp/project/knoppix/">KNOPPIX</a> で起動して、 Windows パーティションのあるファイルを書き換えてゴニョゴニョしてた訳ですが、最近会社の PC は <a href="http://windows.microsoft.com/ja-jp/windows7/products/features/bitlocker">BitLocker</a> を導入してるのですんなり読ませてくれません。<br />最初は KNOPPIX で <a href="http://code.google.com/p/libbde/wiki/Mounting">bdemount</a> すればいいかと思いましたが、これもすんなり動いてくれなかったので考えなおし、新 PC の HDD を USB 接続の外付けケースに入れて、管理者権限のある Windows PC に接続することにしました。中身を見るには BitLocker のリカバリーキーが必要ですが、それは管理者に訪ねれば教えてくれるでしょう。</p>

<p>…という感じで、無事に環境移行完了です。</p>]]></content:encoded>


<dc:subject>パソコン・インターネット</dc:subject>

<dc:creator>carz</dc:creator>
<dc:date>2013-10-07T01:14:40+09:00</dc:date>
</item>


</rdf:RDF>
