<?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>blog::2310</title>
	<atom:link href="http://blog.2310.net/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.2310.net</link>
	<description>2310</description>
	<lastBuildDate>Sat, 06 Aug 2011 23:40:52 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Portable JNetHack &#8211; USBメモリーからJNetHack &#8211; その2</title>
		<link>http://blog.2310.net/archives/758</link>
		<comments>http://blog.2310.net/archives/758#comments</comments>
		<pubDate>Sun, 26 Jun 2011 10:47:58 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[JNetHack]]></category>
		<category><![CDATA[jnethack]]></category>
		<category><![CDATA[nethack]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=758</guid>
		<description><![CDATA[解凍するだけで直接USBメモリー等からも遊べるように調整したポータブル版のJNetHackです。 今回のビルドでは、JNetHack に関するいろいろで公開されている&#8217;JNetHack menucolor hpmon patch&#8217; を適用してみました。kimu@users.sourceforge.jp さんに感謝です。 ダウンロード 7-Zipを使用して自己解凍形式に圧縮しています。適当な場所でダブルクリックしてください。JNetHackというフォルダの中のJNetHack.exeを実行するとゲームが開始します。 PortableJNetHack_3.4.3.010.r2.exe 約1.0MB デフォルトの設定について すぐに開始できるように名前とか種別とか設定しています。もし気に入らない場合はフォルダ内にあるdefault.nhをメモ帳などで編集するか、行頭に#をつけてコメントアウトしてください。 hackaholic から オプション ページも参照してください JNetHack(オリジナル)との比較 JNetHack menucolor hpmon patch JNetHack に関するいろいろで公開されている&#8217;JNetHack menucolor hpmon patch&#8217; を適用してみました。 kimu@users.sourceforge.jp さん作成。 保存データを同じ名前にする措置 JNetHackというよりはNetHack部分です。src/files.c中の825行目周辺を以下のように変更しています。ログインユーザ名を保存データ名に含めていたのを「saved-game.dat」に固定しています。 これによって他のPCで使用しても同じ保存データを使用できるようになります。 /* Obtain the name of the logged on user and incorporate * it into the name. Sprintf(fnamebuf, "%s-%s", get_username(0), plname); (void)fname_encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.", [...]]]></description>
			<content:encoded><![CDATA[<p>解凍するだけで直接USBメモリー等からも遊べるように調整したポータブル版の<a href="http://jnethack.sourceforge.jp/">JNetHack</a>です。</p>

<p>今回のビルドでは、<a href="http://f18.aaa.livedoor.jp/~jnethack/">JNetHack に関するいろいろ</a>で公開されている&#8217;JNetHack menucolor hpmon patch&#8217; を適用してみました。kimu@users.sourceforge.jp さんに感謝です。</p>

<p><img src="http://blog.2310.net/my-store/images/20110626_jnethack.png" alt="nethack play" /></p>

<p><span id="more-758"></span></p>

<h3>ダウンロード</h3>

<p><a href="http://www.7-zip.org/">7-Zip</a>を使用して自己解凍形式に圧縮しています。適当な場所でダブルクリックしてください。JNetHackというフォルダの中のJNetHack.exeを実行するとゲームが開始します。</p>

<ul>
<li><a href="http://blog.2310.net/my-store/download/PortableJNetHack_3.4.3.010.r2.exe" title="PortableJNetHack_3.4.3.010.r2.exeのダウンロード">PortableJNetHack_3.4.3.010.r2.exe</a> 約1.0MB</li>
</ul>

<h3>デフォルトの設定について</h3>

<p>すぐに開始できるように名前とか種別とか設定しています。もし気に入らない場合はフォルダ内にあるdefault.nhをメモ帳などで編集するか、行頭に#をつけてコメントアウトしてください。</p>

<ul>
<li><a href="http://www.hackaholic.net/pukiwiki/index.php">hackaholic</a> から <a href="http://www.hackaholic.net/pukiwiki/index.php?cmd=read&amp;page=%A5%AA%A5%D7%A5%B7%A5%E7%A5%F3">オプション</a> ページも参照してください</li>
</ul>

<h3><a href="http://jnethack.sourceforge.jp/">JNetHack(オリジナル)</a>との比較</h3>

<h4>JNetHack menucolor hpmon patch</h4>

<ul>
<li><a href="http://f18.aaa.livedoor.jp/~jnethack/">JNetHack に関するいろいろ</a>で公開されている&#8217;JNetHack menucolor hpmon patch&#8217; を適用してみました。 kimu@users.sourceforge.jp さん作成。</li>
</ul>

<h4>保存データを同じ名前にする措置</h4>

<p>JNetHackというよりはNetHack部分です。src/files.c中の825行目周辺を以下のように変更しています。ログインユーザ名を保存データ名に含めていたのを「saved-game.dat」に固定しています。</p>

<p>これによって他のPCで使用しても同じ保存データを使用できるようになります。</p>

<pre><code>/* Obtain the name of the logged on user and incorporate
 * it into the name.
Sprintf(fnamebuf, "%s-%s", get_username(0), plname);
(void)fname_encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.",
            '%', fnamebuf, encodedfnamebuf, BUFSZ); */
Sprintf(SAVEF, "saved-game.dat", encodedfnamebuf);
</code></pre>

<h4>コンパイル</h4>

<ol>
<li>Linux側で全ソースコードをダウンロードしてきてパッチあて、修正</li>
<li>Windows側でxyzzyの機能を使用し文字コード変換(EUC-JP→SHIFT_JIS)</li>
<li>Windows側でbcc32を用いてコンパイル</li>
</ol>

<p>…と中途半端な方法をとっています。文字コードの変換でxyzzyを使用しているのは昔iconvとかnkfで変換してもうまくいかなかったからです。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/758/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>org-mode のキー一覧</title>
		<link>http://blog.2310.net/archives/740</link>
		<comments>http://blog.2310.net/archives/740#comments</comments>
		<pubDate>Thu, 23 Dec 2010 07:09:36 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=740</guid>
		<description><![CDATA[org-mode にちょっと触れたメモ 移動とか展開 Key Command Expression C-c C-a show-all 全て表示 C-c C-n outline-next-visible-heading 次の見出し C-c C-p outline-previous-visible-heading 前の見出し C-c C-f outline-forward-same-level 前の同じ階層の見出し C-c C-b outline-backward-same-level 前の同じ階層の見出し C-c C-u outline-up-heading 一つ上の見出し C-c C-j org-goto C-c C-r org-reveal C-c C-x b org-tree-to-indirect-buffer サブツリーを別バッファに TAB org-cycle 展開やその逆 S-tab org-cycle(t) トップレベルのみの表示 TODO関連 Key Command Expression C-c C-t org-todo M-S-return [...]]]></description>
			<content:encoded><![CDATA[<p>org-mode にちょっと触れたメモ</p>

<p><span id="more-740"></span></p>

<h4>移動とか展開</h4>

<table>
<thead>
<tr>
  <th>Key</th>
  <th>Command</th>
  <th>Expression</th>
</tr>
</thead>
<tbody>
<tr>
  <td>C-c C-a</td>
  <td>show-all</td>
  <td>全て表示</td>
</tr>
<tr>
  <td>C-c C-n</td>
  <td>outline-next-visible-heading</td>
  <td>次の見出し</td>
</tr>
<tr>
  <td>C-c C-p</td>
  <td>outline-previous-visible-heading</td>
  <td>前の見出し</td>
</tr>
<tr>
  <td>C-c C-f</td>
  <td>outline-forward-same-level</td>
  <td>前の同じ階層の見出し</td>
</tr>
<tr>
  <td>C-c C-b</td>
  <td>outline-backward-same-level</td>
  <td>前の同じ階層の見出し</td>
</tr>
<tr>
  <td>C-c C-u</td>
  <td>outline-up-heading</td>
  <td>一つ上の見出し</td>
</tr>
<tr>
  <td>C-c C-j</td>
  <td>org-goto</td>
  <td></td>
</tr>
<tr>
  <td>C-c C-r</td>
  <td>org-reveal</td>
  <td></td>
</tr>
<tr>
  <td>C-c C-x b</td>
  <td>org-tree-to-indirect-buffer</td>
  <td>サブツリーを別バッファに</td>
</tr>
<tr>
  <td>TAB</td>
  <td>org-cycle</td>
  <td>展開やその逆</td>
</tr>
<tr>
  <td>S-tab</td>
  <td>org-cycle(t)</td>
  <td>トップレベルのみの表示</td>
</tr>
</tbody>
</table>

<h4>TODO関連</h4>

<table>
<thead>
<tr>
  <th>Key</th>
  <th>Command</th>
  <th>Expression</th>
</tr>
</thead>
<tbody>
<tr>
  <td>C-c C-t</td>
  <td>org-todo</td>
  <td></td>
</tr>
<tr>
  <td>M-S-return</td>
  <td>org-insert-todo-heading</td>
  <td></td>
</tr>
<tr>
  <td>C-c C-v</td>
  <td>org-show-todo-tree</td>
  <td>TODO項目だけを表示</td>
</tr>
<tr>
  <td>S-right</td>
  <td>org-shiftright</td>
  <td>TODO/DONE トグる</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/740/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joruriメモ</title>
		<link>http://blog.2310.net/archives/716</link>
		<comments>http://blog.2310.net/archives/716#comments</comments>
		<pubDate>Sat, 11 Dec 2010 17:06:45 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=716</guid>
		<description><![CDATA[自治体向けCMSのJoruriについて。メモとかリンクとか。 リンク ダウンロード及びインストールマニュアル デモ Ustream : オープンソースカンファレンス2010 Kansai@Kobe 徳島県と共同開発したRailsベースのCMS Joruri（ジョールリ）のご紹介 記事投稿操作マニュアル(PDF形式) OSC京都のセミナー 「JoruriによるWebサイト構築のデモ」資料 内容入力マニュアル(PDF形式) オープンソースCMS Joruri (joruri_org) on Twitter FAQサイト よくある質問から 各種概念とか メニュー「コンセプト」について メニューの「コンテンツ」について 【ディレクトリ】について 【デザイン】メニューの「ピース」について 【ツール】メニューの「再構築」について 【ツール】メニューの「サイト」について ライセンス的なもの 配布ソースに含まれるサンプルの「ジョールリ市」の構成データ（CSS、HTML、アイコン、写真等）は自由に利用してよいのでしょうか？ 他、不具合等 音声ファイル作成が正常に動作しない原因の調査方法はありますか。]]></description>
			<content:encoded><![CDATA[<p>自治体向けCMSの<a href="http://joruri.org/">Joruri</a>について。メモとかリンクとか。
<span id="more-716"></span></p>

<h3>リンク</h3>

<ul>
<li><a href="http://joruri.org/download/index.html">ダウンロード及びインストールマニュアル</a></li>
<li><a href="http://joruri.org/download/onlinedemo.html">デモ</a></li>
<li><a href="http://www.ustream.tv/recorded/5722775?lang=ja_JP">Ustream</a> : オープンソースカンファレンス2010 Kansai@Kobe 徳島県と共同開発したRailsベースのCMS Joruri（ジョールリ）のご紹介</li>
<li><a href="http://joruri.org/faq/docs/2010091300017/files/manual_regdoc.pdf">記事投稿操作マニュアル(PDF形式)</a></li>
<li>OSC京都のセミナー <a href="http://blog.2310.net/my-store/download/kyoto-onlinedemo.pdf" title="「JoruriによるWebサイト構築のデモ」資料のダウンロード">「JoruriによるWebサイト構築のデモ」資料</a></li>
<li><a href="http://joruri.org/faq/docs/2010091300017/files/manual_inputdoc.pdf">内容入力マニュアル(PDF形式)</a></li>
<li><a href="http://twitter.com/joruri_org">オープンソースCMS Joruri (joruri_org) on Twitter</a></li>
<li><a href="http://faq.joruri.org/faq/">FAQサイト</a></li>
</ul>

<h3>よくある質問から</h3>

<h4>各種概念とか</h4>

<ul>
<li><a href="http://faq.joruri.org/faq/2010121000054/">メニュー「コンセプト」について</a></li>
<li><a href="http://faq.joruri.org/faq/2010121000030/">メニューの「コンテンツ」について</a></li>
<li><a href="http://faq.joruri.org/faq/2010121000047/">【ディレクトリ】について</a></li>
<li><a href="http://faq.joruri.org/faq/2010121000016/">【デザイン】メニューの「ピース」について</a></li>
<li><a href="http://faq.joruri.org/faq/2010111000019/">【ツール】メニューの「再構築」について</a></li>
<li><a href="http://faq.joruri.org/faq/2010111000040/">【ツール】メニューの「サイト」について</a></li>
</ul>

<h4>ライセンス的なもの</h4>

<ul>
<li><a href="http://faq.joruri.org/faq/2010102800116/">配布ソースに含まれるサンプルの「ジョールリ市」の構成データ（CSS、HTML、アイコン、写真等）は自由に利用してよいのでしょうか？</a></li>
</ul>

<h4>他、不具合等</h4>

<ul>
<li><a href="http://faq.joruri.org/faq/2010102800048/">音声ファイル作成が正常に動作しない原因の調査方法はありますか。</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/716/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>和暦(元号)変換クラス</title>
		<link>http://blog.2310.net/archives/706</link>
		<comments>http://blog.2310.net/archives/706#comments</comments>
		<pubDate>Thu, 13 May 2010 14:45:43 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[Program]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=706</guid>
		<description><![CDATA[rubyを勉強しています。練習で作成したものです。 #!/usr/bin/ruby -w require 'date' class WaDate &#60; Date GENGOU= { 1868 =&#62; {:full =&#62; '明治', :short =&#62; '明', :alpha =&#62; 'M'}, 1912 =&#62; {:full =&#62; '大正', :short =&#62; '大', :alpha =&#62; 'T'}, 1926 =&#62; {:full =&#62; '昭和', :short =&#62; '昭', :alpha =&#62; 'S'}, 1989 =&#62; {:full =&#62; '平成', :short =&#62; '平', :alpha =&#62; 'H'} [...]]]></description>
			<content:encoded><![CDATA[<p>rubyを勉強しています。練習で作成したものです。</p>

<p><span id="more-706"></span></p>

<pre><code>#!/usr/bin/ruby -w
require 'date'

class WaDate &lt; Date
  GENGOU= {
    1868 =&gt; {:full =&gt; '明治', :short =&gt; '明', :alpha =&gt; 'M'},
    1912 =&gt; {:full =&gt; '大正', :short =&gt; '大', :alpha =&gt; 'T'},
    1926 =&gt; {:full =&gt; '昭和', :short =&gt; '昭', :alpha =&gt; 'S'},
    1989 =&gt; {:full =&gt; '平成', :short =&gt; '平', :alpha =&gt; 'H'}
  }

  def initialize(ajd=0, of=0, sg=ITALY)
    super
    @current_gengou = nil
  end

  def current_gengou
    return @current_gengou if @current_gengou &amp;&amp; @current_gengou[:year] == year
    gengou_start_year = GENGOU.keys.sort.reverse.find do |start_year|
      year &gt; start_year
    end
    @current_gengou = {
      :year =&gt; year,
      :gengou_year =&gt; year - gengou_start_year + 1
    }.merge(GENGOU[gengou_start_year])
  end

  def wa_year(style = nil)
    style &amp;&amp; gengou(style) + current_gengou[:gengou_year].to_s || current_gengou[:gengou_year]
  end

  def gengou(style)
    current_gengou[style] || raise
  end

end



date = WaDate.today # 2010-05-13
puts date.wa_year :full # '平成22'
puts date.gengou :alpha # 'H'
puts date.wa_year + 1 #=&gt; 23
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/706/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimの貼り付け</title>
		<link>http://blog.2310.net/archives/695</link>
		<comments>http://blog.2310.net/archives/695#comments</comments>
		<pubDate>Wed, 05 May 2010 05:17:35 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=695</guid>
		<description><![CDATA[普段はエディタはemacsを使用していますが、サーバのちょっとした設定やsshでのログイン作業にはvimを使用することもあります。 vimを使用していて毎度毎度頭が混乱するのが貼り付け時の挙動なのでメモします。 コマンド 貼付時 実行後カーソル位置 実行後カーソル位置(with g) p(小文字) append(追加)処理。行単位ならカーソルの次行から、文字単位ならカーソルの次の位置から追加する 行単位なら追加した行の行頭へ、文字単位なら追加した文字列の最後の文字へ 行単位なら追加した行の最後へ、文字単位なら追加した文字列の最後の文字へ(gが無い場合と同じ？) P(大文字) insert(挿入)処理。行単位ならカーソルの行から、文字単位ならカーソルの位置から追加する 行単位なら追加した行の行頭へ、文字単位なら追加した文字列の最後の文字へ 行単位なら追加した行の最後へ(小文字pの場合と同様)、文字単位なら追加した文字列の最後の文字の後ろへ gP がWindowsやEmacsのヤンクに近い挙動かもしれません。]]></description>
			<content:encoded><![CDATA[<p>普段はエディタは<a href="http://www.gnu.org/software/emacs/emacs.html">emacs</a>を使用していますが、サーバのちょっとした設定やsshでのログイン作業には<a href="http://www.vim.org">vim</a>を使用することもあります。
<a href="http://www.vim.org">vim</a>を使用していて毎度毎度頭が混乱するのが貼り付け時の挙動なのでメモします。</p>

<p><span id="more-695"></span></p>

<table class="standard_table">
 <thead>
   <tr>
     <th>コマンド</th>
     <th>貼付時</th>
     <th>実行後カーソル位置</th>
     <th>実行後カーソル位置(with g)</th>
   </tr>
 </thead>
 <tbody>
  <tr>
    <th>p(小文字)</th>
    <td>append(追加)処理。行単位ならカーソルの次行から、文字単位ならカーソルの次の位置から追加する</td>
    <td>行単位なら追加した行の行頭へ、文字単位なら追加した文字列の最後の文字へ</td>
    <td>行単位なら追加した行の最後へ、文字単位なら追加した文字列の最後の文字へ(gが無い場合と同じ？)</td>
  </tr>
  <tr>
    <th>P(大文字)</th>
    <td>insert(挿入)処理。行単位ならカーソルの行から、文字単位ならカーソルの位置から追加する</td>
    <td>行単位なら追加した行の行頭へ、文字単位なら追加した文字列の最後の文字へ</td>
    <td>行単位なら追加した行の最後へ(小文字pの場合と同様)、文字単位なら追加した文字列の最後の文字の後ろへ</td>
  </tr>
 </tbody>
</table>

<p>gP がWindowsやEmacsのヤンクに近い挙動かもしれません。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/695/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ボタン</title>
		<link>http://blog.2310.net/archives/682</link>
		<comments>http://blog.2310.net/archives/682#comments</comments>
		<pubDate>Sun, 25 Apr 2010 03:05:28 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[inkscape]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=682</guid>
		<description><![CDATA[Inkscapeで練習として。 それぞれの画像をクリックするとsvgファイルがダウンロードできます(フォントはIPAゴシックを使用)。 ポイント Fillは4段階のグラデーション。上を明るくします。HSVで何となく調整します。 下部分の影は一番上に持ってきています。 文字列のコピーをとって黒くしblurをかけてからオリジナル文字列の左上に配置するとへこんでいるように見えます。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.forest.impress.co.jp/lib/pic/piccam/paint/inkscape.html">Inkscape</a>で練習として。</p>

<p>それぞれの画像をクリックするとsvgファイルがダウンロードできます(フォントはIPAゴシックを使用)。</p>

<div style="margin-left:auto;margin-right:auto;margin-top:1em;"><a href="http://blog.2310.net/my-store/download/20100425_button01.svg"><img src="http://blog.2310.net/my-store/images/20100425_button01.png" alt="サンプルボタンその1" style="border: none;" /></a></div>

<div style="margin-left:auto;margin-right:auto;"><a href="http://blog.2310.net/my-store/download/20100425_button02.svg"><img src="http://blog.2310.net/my-store/images/20100425_button02.png" alt="サンプルボタンその1" style="border: none;" /></a></div>

<p><span id="more-682"></span></p>

<h4>ポイント</h4>

<ul>
<li>Fillは4段階のグラデーション。上を明るくします。HSVで何となく調整します。</li>
<li>下部分の影は一番上に持ってきています。</li>
<li>文字列のコピーをとって黒くしblurをかけてからオリジナル文字列の左上に配置するとへこんでいるように見えます。</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/682/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XREAの環境を整える</title>
		<link>http://blog.2310.net/archives/666</link>
		<comments>http://blog.2310.net/archives/666#comments</comments>
		<pubDate>Sat, 26 Sep 2009 05:13:13 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=666</guid>
		<description><![CDATA[XREAはsshでログインすることができます。コマンドで使用するためのメモをまとめます。 Mercurialについて インストール xrea/mercurialにある通り実行します。 ダウンロード後 make&#38;&#38;install $ wget mercurial-XXX; cd mercurial-XXX $ HOME=$HOME/local make install-home -- test $ export PYTHONPATH=$HOME/local/lib/python $ export PATH=$PATH:$HOME/local/bin $ hg debuginstall .bashrcに以下の内容を書き込みます。 export PATH=$PATH:$HOME/local/bin export PYTHONPATH=$HOME/local/lib/python MySQLについて バックアップ 圧縮ダンプします mysqldump &#60;databas-name&#62; -u &#60;user_name&#62; -p &#124; bzip -c &#62; path/to/file.bz2]]></description>
			<content:encoded><![CDATA[<p>XREAはsshでログインすることができます。コマンドで使用するためのメモをまとめます。</p>

<p><span id="more-666"></span></p>

<h4>Mercurialについて</h4>

<h5>インストール</h5>

<p><a href="http://w.nikori.tk/index.php?xrea%2Fmercurial">xrea/mercurial</a>にある通り実行します。</p>

<p>ダウンロード後 make&amp;&amp;install</p>

<pre><code>$ wget mercurial-XXX; cd mercurial-XXX
$ HOME=$HOME/local make install-home
-- test
$ export PYTHONPATH=$HOME/local/lib/python
$ export PATH=$PATH:$HOME/local/bin
$ hg debuginstall
</code></pre>

<p>.bashrcに以下の内容を書き込みます。</p>

<pre><code>export PATH=$PATH:$HOME/local/bin
export PYTHONPATH=$HOME/local/lib/python
</code></pre>

<h4>MySQLについて</h4>

<h5>バックアップ</h5>

<p>圧縮ダンプします</p>

<pre><code>mysqldump  &lt;databas-name&gt;  -u &lt;user_name&gt; -p | bzip -c &gt;  path/to/file.bz2
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/666/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xyzzyをちょこちょこ改造</title>
		<link>http://blog.2310.net/archives/618</link>
		<comments>http://blog.2310.net/archives/618#comments</comments>
		<pubDate>Tue, 22 Sep 2009 18:12:43 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[xyzzy]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=618</guid>
		<description><![CDATA[テキストエディタxyzzyをUSBメモリーで使用できるよう少しずつ改造しています。 xyzzyとはフリー/シェアで公開されているエディタの中でもトップクラスの高性能なエディタです。詳しくはXyzzy Wikiの中にあるintroを見てみましょう。 機能 xyzzyに以下の機能を追加して再ビルドするものです。 HOMEの自動設定。以下の順に検索($XYZZY &#8230; xyzzyインストールフォルダ $DRIVE &#8230; xyzzyのあるドライブ) $XYZZY\home $DRIVE\xyzzyhome $DRIVE\home $XYZZY xyzzy.iniを$XYZZY\usr内に保存(ユーザ名やOS名でフォルダ分けしない) ダンプファイルをxyzzy.imageとしてシステムのTempフォルダへ保存/読込 unlha32.dllなど各種アーカイバDLLがシステムフォルダや$XYZZY内に存在しない場合は$XYZZY\libも検索 putenv関数の追加(詳しくは「パッチ更新の履歴」参照) ダウンロード xyzzy-0.2.235-2009092301.patch を適用した xyzzy.exe、xyzzyenv.exe、xyzzycli.exe です。ダウンロード解凍後、本体のものと置き換えてください。 xyzzy-20090923.zip (xyzzy-0.2.235ベース 約741KB) その他、個人的な設定など 以下はおまけですが私は.xyzzyの位置をusrディクレトリ直下に固定しています。USBメモリーなどから直接使用する際にHOMEディレクトリやXYZZYHOMEの設定と関係無く.xyzzyファイルを読み込むためです。なお、estartup.lcが存在する場合(普通は存在するはず)はestartup.lを編集後バイトコンパイルしなければいけません。 --- xyzzy/lisp/estartup.l 2003-06-29 01:07:14.000000000 +0900 +++ xyzzy-merged/lisp/estartup.l 2006-04-08 11:17:10.000000000 +0900 @@ -147,11 +147,12 @@ (ignore-errors (load-history-file-compat))) (unless no-init-file (trap-errors (let ((*loading-user-initial-file* t)) (load (namestring (if (file-system-supports-long-file-name-p [...]]]></description>
			<content:encoded><![CDATA[<p>テキストエディタ<a href="http://www.jsdlab.co.jp/~kamei/">xyzzy</a>をUSBメモリーで使用できるよう少しずつ改造しています。</p>

<p>xyzzyとはフリー/シェアで公開されているエディタの中でもトップクラスの高性能なエディタです。詳しくは<a href="http://xyzzy.s53.xrea.com/wiki/">Xyzzy Wiki</a>の中にある<a href="http://xyzzy.s53.xrea.com/wiki/index.php?QuickTour%2Fintro">intro</a>を見てみましょう。</p>

<p><span id="more-618"></span></p>

<h3>機能</h3>

<p>xyzzyに以下の機能を追加して再ビルドするものです。</p>

<ul>
<li>HOMEの自動設定。以下の順に検索($XYZZY &#8230; xyzzyインストールフォルダ $DRIVE &#8230; xyzzyのあるドライブ)

<ul>
<li>$XYZZY\home</li>
<li>$DRIVE\xyzzyhome</li>
<li>$DRIVE\home</li>
<li>$XYZZY</li>
</ul></li>
<li>xyzzy.iniを$XYZZY\usr内に保存(ユーザ名やOS名でフォルダ分けしない)</li>
<li><a href="http://xyzzy.s53.xrea.com/qanda/wiki.cgi?w=%3Csection%3E%A5%C0%A5%F3%A5%D7%A5%D5%A5%A1%A5%A4%A5%EB%3C%2Fsection%3E&amp;a=show">ダンプファイル</a>をxyzzy.imageとしてシステムのTempフォルダへ保存/読込</li>
<li>unlha32.dllなど各種アーカイバDLLがシステムフォルダや$XYZZY内に存在しない場合は$XYZZY\libも検索</li>
<li>putenv関数の追加(詳しくは「パッチ更新の履歴」参照)</li>
</ul>

<h3>ダウンロード</h3>

<p><a href="http://blog.2310.net/my-store/download/xyzzy-0.2.235-2009092301.patch.txt" title="xyzzy-0.2.235-2009092301.patch のダウンロード">xyzzy-0.2.235-2009092301.patch </a>を適用した
xyzzy.exe、xyzzyenv.exe、xyzzycli.exe です。ダウンロード解凍後、本体のものと置き換えてください。</p>

<ul>
<li><a href="http://blog.2310.net/my-store/download/xyzzy-20090923.zip" title="xyzzy-20090923.zipのダウンロード">xyzzy-20090923.zip</a> (xyzzy-0.2.235ベース 約741KB)</li>
</ul>

<h3>その他、個人的な設定など</h3>

<p>以下はおまけですが私は.xyzzyの位置をusrディクレトリ直下に固定しています。USBメモリーなどから直接使用する際にHOMEディレクトリやXYZZYHOMEの設定と関係無く.xyzzyファイルを読み込むためです。なお、estartup.lcが存在する場合(普通は存在するはず)はestartup.lを編集後バイトコンパイルしなければいけません。</p>

<pre><code>--- xyzzy/lisp/estartup.l   2003-06-29 01:07:14.000000000 +0900
+++ xyzzy-merged/lisp/estartup.l   2006-04-08 11:17:10.000000000 +0900
@@ -147,11 +147,12 @@
       (ignore-errors (load-history-file-compat)))
     (unless no-init-file
       (trap-errors
        (let ((*loading-user-initial-file* t))
          (load (namestring (if (file-system-supports-long-file-name-p "~/")
-                               "~/.xyzzy" "~/_xyzzy"))
+             (merge-pathnames "usr/.xyzzy" (si:system-root))
+             (merge-pathnames "usr/_xyzzy" (si:system-root))))
                :if-does-not-exist nil :verbose nil :print nil)))
       (unless *inhibit-history-load*
        (ignore-errors (load-history-file))))
     (ignore-errors (keep-compatibility))
     (ignore-errors (init-app-menus))
</code></pre>

<h3>Special Thanks</h3>

<ul>
<li><a href="http://xyzzy.s53.xrea.com/wiki/">Xyzzy Wiki</a>の佐野さん</li>
<li><a href="http://xyzzy.s53.xrea.com/wiki/">Xyzzy Wiki</a>のみなさん</li>
<li>そしてエディタ<a href="http://www.jsdlab.co.jp/~kamei/">xyzzy</a>を提供してくださっている亀井さん</li>
</ul>

<h3>更新の履歴</h3>

<h4>2009/09/23</h4>

<p><a href="http://blog.2310.net/my-store/download/xyzzy-0.2.235-2009092301.patch.txt" title="xyzzy-0.2.235-2009092301.patch.txt のダウンロード">xyzzy-0.2.235-2009092301.patch.txt </a></p>

<ul>
<li>xyzzycli.exeの接続不具合解消パッチ適用 <br />(<a href="http://xyzzy.s53.xrea.com/wiki/index.php?Memo%2F%A5%BD%A1%BC%A5%B9%A4%AB%A4%E9%A5%D3%A5%EB%A5%C9%A4%B7%A4%C6%A4%DF%A4%EB3">XyzzyWiki内「Memo/ソースからビルドしてみる3」</a>のコメント部分)</li>
</ul>

<h4>2008/09/21</h4>

<p><a href="http://blog.2310.net/my-store/download/xyzzy-0.2.235-2008092101.patch.txt" title="xyzzy-0.2.235-2008092101.patch.txt のダウンロード">xyzzy-0.2.235-2008092101.patch.txt </a></p>

<ul>
<li>putenv関数を追加
<pre><code>
;; .xyzzyとかで(si:putenv VARIABLE) を使用してみる
;; $xyzzy/binを環境変数PATHに追加(有効なのはxyzzy.exeからのプロセスだけです)
(in-package "editor")
(setq &#42;bin-path&#42; (merge-pathnames "bin" (si:system-root)))
(in-package "user")
(setq &#42;bin-path&#42; (merge-pathnames "bin" (si:system-root)))
(si:putenv  (concat "PATH=" (map-slash-to-backslash &#42;bin-path&#42;) ";" (si:getenv "PATH")));
</code></pre></li>
</ul>

<h4>2008/09/15</h4>

<p><a href="http://blog.2310.net/my-store/download/xyzzy-0.2.235-2008091502.patch.txt" title="xyzzy-0.2.235-2008091502.patch.txt のダウンロード">xyzzy-0.2.235-2008091502.patch.txt </a></p>

<ul>
<li>USBメモリーで使用できるようパッチを追加

<ul>
<li>Homeディレクトリの自動設定。以下の順に検索

<ul>
<li>$XYZZY\home</li>
<li>$DRIVE\xyzzyhome</li>
<li>$DRIVE\home</li>
<li>$XYZZY</li>
</ul></li>
<li>xyzzy.iniを$XYZZY\usrに保存(ユーザ名やOS名でフォルダ分けしない)</li>
<li>ダンプファイルxyzzy.imageとしてシステムのTempフォルダへ保存/読込</li>
<li>unlha32.dllなど各種アーカイバDLLがシステムフォルダや$XYZZY内に存在しない場合は$XYZZY\libも検索</li>
</ul></li>
</ul>

<h4>2008/09/15</h4>

<p><a href="http://blog.2310.net/my-store/download/xyzzy-0.2.235-2008091501.patch.txt" title="xyzzy-0.2.235-2008091501.patch.txt のダウンロード">xyzzy-0.2.235-2008091501.patch.txt </a></p>

<ul>
<li>VC9用のpatchを作成</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/618/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>emacs-w3m上で短縮URLを取得する &#8211; その2</title>
		<link>http://blog.2310.net/archives/604</link>
		<comments>http://blog.2310.net/archives/604#comments</comments>
		<pubDate>Sun, 06 Sep 2009 10:03:59 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=604</guid>
		<description><![CDATA[前回(emacs-w3m上で短縮URLを取得する &#8211; その1)で紹介したemacs-w3m内で短縮URLを取得する関数ですがちょっと整理して、TinyURL、bit.ly、ig.gdなど複数のサービスに対応するようにしてみました。 前回のサービス毎の関数を一つにまとめています。 ;; サービスを使用して短縮URLをkill-ringに入れる関数 ;; 引数 url ... URL ;; 引数 service ... 使用するサービス -&#62; 'TinyURL or 'is.gd or 'bit.ly (defun shorten-url-to-kill-ring (url &#38;optional service) (let (service-uri key get-regexp method) ;; default service to shorten (unless service (setq service 'TinyURL)) ;; switch parameter by each url-shorten service (cond ((eq service 'TinyURL) ;; via [...]]]></description>
			<content:encoded><![CDATA[<p>前回(<a href="http://blog.2310.net/archives/582">emacs-w3m上で短縮URLを取得する &#8211; その1</a>)で紹介したemacs-w3m内で短縮URLを取得する関数ですがちょっと整理して、<a href="http://www.tinyurl.com/">TinyURL</a>、<a href="http://bit.ly/">bit.ly</a>、<a href="http://is.gd/">ig.gd</a>など複数のサービスに対応するようにしてみました。</p>

<p><span id="more-604"></span>
前回のサービス毎の関数を一つにまとめています。</p>

<pre><code>;; サービスを使用して短縮URLをkill-ringに入れる関数
;; 引数 url     ... URL
;; 引数 service ... 使用するサービス -&gt; 'TinyURL or 'is.gd or 'bit.ly
(defun shorten-url-to-kill-ring (url &amp;optional service)
  (let (service-uri
        key
        get-regexp
        method)
    ;; default service to shorten
    (unless service (setq service 'TinyURL))
    ;; switch parameter by each url-shorten service
    (cond ((eq service 'TinyURL)
           ;; via http://tinyurl.com/  use API
           (setq service-uri "http://tinyurl.com/api-create.php")
           (setq key "url")
           (setq method "POST")
           (setq get-regexp "\\(http://tinyurl.com/.+\\)"))
          ((eq service 'is.gd)
           ;; via http://is.gd/  use API
           (setq service-uri "http://is.gd/api.php")
           (setq key "longurl")
           (setq method "GET")
           (setq get-regexp "\\(http://is.gd/.+\\)"))
          ((eq service 'bit.ly)
           ;; via http://bit.ly/  NOT USE API, get from web page
           (setq service-uri "http://bit.ly")
           (setq method "POST")
           (setq key "url")
           (setq get-regexp "id *= *\"shortened-url\" +value *= *\"\\(http://bit.ly/.+\\)\" +/&gt;")))
    ;; use url package ...
    (setq url-request-method method)
    (if (equal method "POST")
        (setq url-request-data (concat key "=" (url-hexify-string url)))
      (setq url-request-data nil)
      (setq service-uri (concat service-uri "?" key "=" (url-hexify-string url))))
    ;; Now, try to fetch short URL
    (url-retrieve service-uri
                  '(lambda (status cbargs)
                     (point-min)
                     (if (re-search-forward (car (cdr cbargs)) nil t)
                         (progn
                           (setq result-url (match-string-no-properties 1))
                           (kill-new result-url nil)
                           (message "Copy '%s' to ring, shorten %s" result-url (car cbargs))))
                     (kill-buffer (current-buffer)))
                  (list (list url get-regexp)))))




;; 上をw3m上から使用するための関数 (この例ではis.gdを使用する)
(defun my-w3m-shorten-url ()
  (interactive)
  (shorten-url-to-kill-ring
     (or (w3m-url-valid (w3m-anchor))
         (w3m-url-valid w3m-current-url))
     'is.gd))
</code></pre>

<p>キーバインドとかは必要だったら適当にしてください。</p>

<pre><code>(eval-after-load "w3m"
  '(progn
     ;; w3m-mode-map key binds
     (define-key w3m-mode-map "\C-cs" 'my-w3m-shorten-url)))
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/604/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>emacs-w3m上で短縮URLを取得する &#8211; その1</title>
		<link>http://blog.2310.net/archives/582</link>
		<comments>http://blog.2310.net/archives/582#comments</comments>
		<pubDate>Sat, 05 Sep 2009 03:52:39 +0000</pubDate>
		<dc:creator>2310</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.2310.net/?p=582</guid>
		<description><![CDATA[Twitterを使用するようになってからTinyURLとかbit.ly使用する機会が増えたのでemacs上のw3mから簡単に短縮URLを取得できるように関数を作成しました。Twitter自体自動的にURLを短縮する機能を持っているようですけど。 この投稿については内容が更新されています。「emacs-w3m上で短縮URLを取得する &#8211; その2」の方を利用してください。 以下の関数を.emacsとかに書き込みます。 ;; URLを短縮してkill-ringの中に入れる関数(TinyURLを使用バージョン ... API使用) (defun shorten-url-tinyurl(url) (let ((shorten-uri "http://tinyurl.com/api-create.php") (url-request-method "POST") (url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))) (url-request-data (concat "url=" (url-hexify-string url)))) (url-retrieve shorten-uri '(lambda (status cbargs) (point-min) (if (re-search-forward "\\(http://tinyurl.com/.+\\)" nil t) (progn (setq result-url (match-string-no-properties 1)) (kill-new result-url nil) (message "Copy '%s' to ring, shorten %s" result-url cbargs))) (kill-buffer (current-buffer))) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.twitter.com">Twitter</a>を使用するようになってから<a href="http://tinyurl.com">TinyURL</a>とか<a href="http://bit.ly/">bit.ly</a>使用する機会が増えたのでemacs上のw3mから簡単に短縮URLを取得できるように関数を作成しました。Twitter自体自動的にURLを短縮する機能を持っているようですけど。</p>

<p>この投稿については内容が更新されています。「<a href="http://blog.2310.net/archives/604">emacs-w3m上で短縮URLを取得する &#8211; その2</a>」の方を利用してください。</p>

<p><span id="more-582"></span>
以下の関数を.emacsとかに書き込みます。</p>

<pre><code>;; URLを短縮してkill-ringの中に入れる関数(TinyURLを使用バージョン ... API使用)
(defun shorten-url-tinyurl(url)
  (let ((shorten-uri "http://tinyurl.com/api-create.php")
        (url-request-method "POST")
        (url-request-extra-headers
             '(("Content-Type" . "application/x-www-form-urlencoded")))
        (url-request-data (concat "url=" (url-hexify-string url))))
    (url-retrieve shorten-uri
                  '(lambda (status cbargs)
                     (point-min)
                     (if (re-search-forward  "\\(http://tinyurl.com/.+\\)" nil t)
                         (progn
                           (setq result-url (match-string-no-properties 1))
                           (kill-new result-url nil)
                           (message "Copy '%s' to ring, shorten %s" result-url cbargs)))
                     (kill-buffer (current-buffer)))
                  (list url))))

;; URLを短縮してkill-ringの中に入れる関数(bit.lyを使用バージョン ... API不使用)
(defun shorten-url-bitly (url)
  (let ((shorten-uri "http://bit.ly")
        (shorten-uri-get-regexp "id *= *\"shortened-url\" +value *= *\"\\(http://bit.ly/.+\\)\" +/&gt;")
        (url-request-method "POST")
        (url-request-extra-headers
             '(("Content-Type" . "application/x-www-form-urlencoded")))
        (url-request-data (concat "url=" (url-hexify-string url))))
    (url-retrieve shorten-uri
                  '(lambda (status cbargs)
                     (point-min)
                     (if (re-search-forward (car (cdr cbargs)) nil t)
                         (progn
                           (setq result-url (match-string-no-properties 1))
                           (kill-new result-url nil)
                           (message "Copy '%s' to ring, shorten %s" result-url (car cbargs))))
                     (kill-buffer (current-buffer)))
                  (list (list url shorten-uri-get-regexp)))))



;; 上をw3m上から使用するための関数
(defun my-w3m-shorten-url ()
  (interactive)
  (shorten-url-tinyurl ;; もしくは shorten-url-bitly
   (or (w3m-url-valid (w3m-anchor))
       (w3m-url-valid w3m-current-url))))
</code></pre>

<p>キーバインドとかは必要だったら適当にしてください。</p>

<pre><code>(eval-after-load "w3m"
  '(progn
     ;; w3m-mode-map key binds
     (define-key w3m-mode-map "\C-cs" 'my-w3m-shorten-url)))
</code></pre>

<p>ちなみに<a href="http://tinyurl.com">TinyURL</a>と<a href="http://bit.ly/">bit.ly</a>バージョンを用意しています。好きな方を選択してください。ただしbit.lyバージョンはAPIではなく通常のWebページから取得しているためWebページの改装等で使用できなくなる可能性があります。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.2310.net/archives/582/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

