http://comments.deasil.com/2008/08/18/iphone-ssh-review-issh-v-pterm-v-touchterm/

iSSH(1.0), pTerm(1.1), TouchTerm(2.0)の3つを比較したエントリなのですが、2.0になったばかりのTouchTermが良さそうです。というわけでTouchTermのところをザクっと挙げてみます。ちなみにお値段:$2.99。

TouchTerm2.0

appStoreはここから

カスタマイズ可能な設定

  • フォントサイズ
  • 色:背景
  • 色:テキスト
  • 色:カーソル
  • その他

バッファーmode、immediate sending mode

バッファでまとめて入力してから、サーバコマンドを送るモードがあります。複雑なコマンドを発行したい場合に便利。です。また、immediate sending modeにすることでバッファmode offにもできる。

画面を広くできる

メインスクリーンをタッチすることで、キーボードが非表示になり、全画面がターミナルになる。

画面上部にある固定キー(hard keys bar)

clear, ctrl, tab, esc, arrows, settingsのボタンがあって、1タッチでスクリーンをクリアできる(小さな画面のiPhoneではとても便利!)。

キー管理、認証ができる

キーの生成、publicキーをメールで送ることで、privateキーと連携したコネクションが使えるようになる。

コネクションの設定が保存(サーバ名、ポート、ユーザ名、password(optional)、key(optional))可能。またQuick Connectでは最後の設定を"one-time connection"(one-timeといいつつも先の設定を保存してくれている)として使えるのが便利。

より詳細なTouchTerm2の新機能:pdf

http://www.jbrink.net/touchterm/TouchTerm2.pdf

posted by Png satoko on Fri 22 Aug 2008 at 06:13

EC2でパッケージのRubyではなく、srcからRubyを入れて使う場合、 イメージの状態によってはAMI-toolsがLOAD_PATH不足で正しく起動できない場合がある。

その場合、以下のようにAMI-toolsのスクリプトを書き換える。

/usr/local/bin/ec2-bundle-vol

   1  #!/bin/bash
   2  ruby -I/usr/lib/site_ruby /usr/lib/site_ruby/aes/amiutil/bundlevol.rb $*

-IオプションでLOAD_PATHを補っている。

posted by Png genki on Fri 22 Aug 2008 at 04:17

備忘録として。

ウインドウをいくつも開くと、タスクバーに表示されているタスクバーボタンがまとまってしまうことがある。

↓まとまっている状態のタスクバーボタン

ber2.png

まとまってしまうと、特定のウインドウを表示させたいときに手間がかかるので、タスクバーボタンをまとまらないようにする。

↓まとまっていない状態のタスクバーボタン

ber.png

方法

タスクバー上で右クリックをする。
プロパティをクリックする。
タスクバーのデザイン」にある「同様のタスクバーボタンをグループ化する」のチェックをはずして「適用」「OK]をクリックする。

posted by Png mari on Thu 21 Aug 2008 at 02:51

The PaginationScope library is a pagination library of the NamedScope era.

The difference to the last version is only a small bug fix. So you can keep using it if you don't mind.

That's all. But I shall use this opportunity to write some document for the helper method of the library.

SYNOPSIS:

   1  paginate <scope>[, <options>]

The scope is a pagination scope object. The options is a hash including several parameters as follows.

  • :newer The label string for the link to a newer page.
  • :older The label string for the link to an older page.
  • :left The number of pages which appears on the left side.
  • :right The number of pages which appears on the right side.
  • :window The width of pages which surrounds the current page.
posted by Png takiuchi on Wed 20 Aug 2008 at 02:34

Git-1.6がリリース されたようなので、手元の環境をアップデートしてみました。

   1  % su
   2  # cd /usr/local/src
   3  # wget http://kernel.org/pub/software/scm/git/git-1.6.0.tar.bz2
   4  # tar xvjf git-1.6.0.tar.bz2
   5  # cd git-1.6.0
   6  # make
   7  # rm -rf /usr/local/bin/git-*
   8  # make install
   9  # make install-doc

1.6からgit-xxxxxというサブコマンド系のコマンドが無くなったようなので、 古い実行ファイルを削除してみました。

posted by Png genki on Tue 19 Aug 2008 at 13:03

remote_functionではPost値を:withでいちいち指定する必要がある。 フィールドの数が多い場合は大変だ。

そういう場合、prototype.jsにForm.serialize('フォームのID')でフォームの値をname1=value1&name2=value2形式にしてくれる関数が便利である。

   1  <%= javascript_include_tag "prototype" %>
   2  <script language="JavaScript">
   3  function newArticle(){
   4      <%= remote_function(:url => {:action => :new},
   5                           :update => 'list',
   6                           :with => "Form.serialize('article')"
   7      ) %>
   8  }
   9  </script>
  10  

posted by Face ysakaki on Tue 19 Aug 2008 at 12:01

たとえばJavaScriptの都合などでactionがnewでもeditでもフォームタグのidが同じになって欲しいことがある。 そういう場合は:html=>{:name1=>'value1',:name2=>'value2'}でhtmlオプションを指定できる。

   1  <% remote_form_for(@article, :url => {:action => :update, :id => @article}, :update => 'list',:html=>{:id=> 'article'}) do |f| %>
   2  
   3    <%= render :partial=>f %>
   4  
   5    <p>
   6      <%= f.submit "保存" %>
   7    </p>
   8  <% end %>

posted by Face ysakaki on Tue 19 Aug 2008 at 11:56

Markdownをpreg-markdownに切り替える ついでに、 Formulaの コメントのプレビューができるようにしました。

コメント中に $x=y$ のように記述することでインライン形式で数式を記述できます。 また、

\[
f(x)=\int_0^x g(t)\,dt
\]

のように書くことで、ディスプレイスタイルで数式を含めることも出来ます。

そのうちこちらのブログでもこの記法を使えるようにする予定です。

posted by Png genki on Tue 19 Aug 2008 at 00:01

RubyでMarkdown記法というと、BlueClothが有名なのではないかと思いますが、rdiscountとrpeg_markdownという新しいライブラリが Daring Fireball氏のこちらの記事で紹介されていました。

Better Markdown Libraries for Ruby: RDiscount and rpeg-markdown

Ryan Tomayko has solved this with two new Ruby extensions that wrap extremely fast (and accurate) C libraries for Markdown: David Loren Parsons’s Discount and Jon MacFarleane’s peg-markdown.

早速 Formula で使ってみようと検証していたのですが、上述の二つのライブラリには、 エスケープの仕方でMARKDOWN記法の解釈に以下のような違いがあるようです。

   1  source = "[test](http://foo.com/?x%3Dx%2B5%2B2y)"
   2  RDiscount.new(source).to_html
   3  #=> "<p><a href=\"http://foo.com/?x%253Dx%252B5%252B2y\">test</a></p>\n"
   4  Markdown.new(source).to_html # rpeg-markdown
   5  #=> "\n\n<p><a href=\"http://foo.com/?x%3Dx%2B5%2B2y\">test</a></p>"

RDiscountの方は、エスケープ済みのQuery Stringをもう一回エスケープしてしまっているようです。

posted by Png genki on Mon 18 Aug 2008 at 23:35 with 2 comments

Rails勉強会@東京第32回 に参加してきました。 お盆の最中だったせいか、いつもの半分ぐらいの参加者でした。 そのせいか、いつもとちょっと違ったRails勉強会となりました。

  • シングルトラック
  • 3セッション
  • 自己紹介が最後

これがなかなか良かったです。 ただ、人数が多いとできない形式でしょうね。

IMG_0139.JPG

実際に行われたセッションは以下の通り。

  • YuguiさんによるRedmineの話(実質は高橋会長によるRESTトーク)
  • 大場さんによるJRubyで拡張を作る話
  • 西さんによるgitの話(入門から仕事で使えるレベルまで)

いずれもハイクオリティなセッションで面白かったです。 僕はgitの話でちょっと話をしました。 リポジトリ間で相互のpush/pullするのが出来たので満足。 それから、git-instawebやgit-guiという、 Git用のGUIツールがある事を教わりました。

posted by Png genki on Mon 18 Aug 2008 at 01:09 with 3 comments