しばらく前からOpenIDについていろいろ調べているのですが、 個人情報が一箇所に集中することで、便利になる反面、 セキュリティ上のリスクが高まるという指摘があります。

確かにその通りで、対策を考えていたのですが、 マスターキーを秘密分散方式で複数作るのが、妥当な解決策かもしれないと思いました。 2つ鍵穴があるドアのイメージですね。 どちらか一方を奪われても安全なわけです。 セキュリティ強度の必要に応じて3つ、4つと増やしても良いですね。

現状のOpenIDの仕様の上でうまいこと運用できないかなあ。

See Also

posted by Png genki on Tue 25 Mar 2008 at 02:58

I have introduced here(Japanese) how to make your rubygem about a year ago. After that, time has passed quickly and many things have become old. So today I would like to report about followups of that methods.

At first, please recall the methods. First one which Mr. Secondlife had told us here(Japanese) is the method using the NewGem. Second one I told is to use the Hoe. The Hoe is the rubygem which makes a skeleton of gem easily. They are still useful ways.

Finally I found the new hope. That is the cutagem.

cutagem documentation

cutagem (Cut a Gem) is yet another executable for creating gem skelton. This is similar in concept to newgem but more customizable for each user.

This is very simple and able to generate a more customizable Rakefile than the Hoe. It seems very interesting. I will try it for a while.

posted by Png takiuchi on Mon 24 Mar 2008 at 04:26

急に必要になったので作りました。

   1  javascript:void(alert(document.getElementById('wys_frame').contentDocument.body.innerHTML.replace(/<.*?>|\s+/g, '').length))

自分が使えれば十分だったのでFirefoxのみ動作確認。 こういうとき、FlashではないAjaxアプリの便利さを実感しますね。

追記

やっぱり毎回Bookmarkletを起動するのが面倒になったので、 document.titleに2秒間隔で文字数を表示するバージョンを作りました。

   1  javascript:void(clearInterval(window.gdocs_counter),window.gdocs_counter = setInterval(function(){var s=document.getElementById('wys_frame').contentDocument.body.innerHTML.replace(/<.*?>|\s+/g, '');document.title = document.title.replace(/\s*(\[.*?\])?$/, [' [', s.length, ' chars]'].join(''));}, 2000))

posted by Png genki on Sun 23 Mar 2008 at 22:10 with 1 comment

小口現金とは、すぐに使用できるように会社に置いておく小額の現金のことを言います。

インプレスト・システム(定額資金前渡制)

インプレスト・システムとは、小口現金に定額を決め(たとえば、50,000円)、前週に使用した分(たとえば、34,000円)を補填して週のはじめは常に一定の金額にしておくことを言います(週の終わりに補填することもあります)。

小口現金は仕訳には出てきません。

たとえば、週の終わりまでに交通費20,000円、通信費14,000円を使用し、翌週のはじめに当座預金から34,000円を小口現金として補填したとします。 その場合に、小口現金を含めた仕訳にしてしまうと、

借方貸方
交通費20000小口現金34000
通信費14000
小口現金34000当座預金34000

と、なります。 小口現金から、交通費と通信費を使用し、当座預金から小口現金に補填しているという仕訳です。 小口現金が借方にも貸方にもあり、その金額が同額であるので、両者とも削除することができます。 ですので、正しくは、

借方貸方
交通費20000当座預金34000
通信費14000

と、なります。

小口現金に関しては、仕訳に出てこない代わりに、小口現金出納帳に、お金の出入りを書いていくことになります。

posted by Png mari on Sun 23 Mar 2008 at 21:30

via: http://blog.obiefernandez.com/content/2008/03/big-name-compan.html

フツーにいっぱいありますね。JP Morganみたいな硬いところが使っているのが新鮮。けど社内用がメインかしらん。

http://www.workingwithrails.com/high-profile-organisationsより

  • amazon.com
  • BBC
  • CapGemini
  • BPN
  • Cisco
  • C|Net
  • EA (Electronic Arts)
  • IBM
  • JP Morgan
  • NASA
  • Oakley
  • Oracle
  • Siemens
  • ♫ ThoughtWorks ♫
  • Yahoo!

Obieさんのクライアント、友達から聞いて多分使っているところ

  • John Deere
  • New York Times
  • NBC
  • Barclays
  • LA Times
  • Chicago Tribune
  • Orbitz
  • Google
  • Turner Media
  • Limewire

http://rails100.pbwiki.com/より

  • twitter.com [642 !!?! I thought it would be higher]
  • scribd.com [940]
  • blingee.com [1170]
  • yellowpages.com [1734]
  • penny-arcade.com [2069]
  • 43things.com [4190]
  • kongregate.com [4488]
  • pitchforkmedia.com [4740]
  • projectpath.com [5041 One of the Basecamp hostnames]
  • funnyordie.com [5089]
posted by Png satoko on Sat 22 Mar 2008 at 22:30

ようやくこの日が来ましたね。

Changeset 9067

Add has_one :through support. #4756 [thechrisoshow]

yuguiさんの has_one :through の頃からだから、実に1年半以上の時間がかかったわけですね。感慨深い。

See Also

posted by Png genki on Sat 22 Mar 2008 at 18:06
21st Fri

当座借越

当座借越とは、当座預金の預金残高を超えた小切手を振り出すことができることを言います。 預金残高を超えた金額に関しては、銀行からの借入金という認識となります。

この処理については、二通りの方法があります。

当座」勘定で処理をする場合(一勘定制)

この処理の場合は、預金残高を超える金額の仕訳については、「当座預金」勘定は使用しないことになります。

当座預金の残高は300,000円の場合に、買掛金の支払いで400,000円の小切手を振り出したとします。

その場合の仕訳は、

借方貸方
買掛金400000当座400000

と、なります。

次に、売掛金200,000円を現金で回収し、直ちに当座預金に預け入れたとします。

その場合の仕訳は、

借方貸方
当座200000売掛金200000

と、なります。 いくらが借入金で、当座預金にいくら残っているのかを気にせずに、全て「当座」勘定を用いることとなります。 「当座」勘定は当座預金がマイナスの場合でもプラスになっても用いるので、「資産」と「負債」の両方の性質を持つこととなります。 仕訳のたびに、「当座」勘定が資産か負債かを考える必要があります。

当座借越」で処理をする場合(二勘定制)

この処理の場合は、預金残高を超える金額の仕訳については、「当座借越」勘定を使用することとなります。

当座預金の残高は300,000円の場合に、買掛金の支払いで400,000円の小切手を振り出したとします。

その場合の仕訳は、

借方貸方
買掛金400000当座預金300000
当座借越100000

と、なります。

次に、売掛金200,000円を現金で回収し、直ちに当座預金に預け入れたとします。

その場合の仕訳は、

借方貸方
当座借越100000売掛金200000
当座預金100000

と、なります。 借入金=当座借越ということになるので、いくら銀行から借りているのか、当座預金はいくらあるのかがわかりやすい仕訳になります。 「当座借越」勘定は「負債」になります。

posted by Png mari on Fri 21 Mar 2008 at 22:16

I am worrying about the future of our natural right on the Internet. Here right I say is for us to be human obviously. In a word, it is becoming harder and harder for computers to distinguish human and bot.

Our activities on the Internet is too simple to recognize ourselves as human beings. There are only click, click, click many clicks and sometimes typings. Needless to say about clicks, nowadays, even typings are easy to be imitated by using algorithms of a sort of Markov-chain.

I think that this problem is worth discussing more. If we lose this identity war, most of internet companies will lose their values brought by advertisements.

I guess that the identity provider such as OpenID Providers becomes very important role in near future. They will become providing not only an identity but human proofs.

posted by Png takiuchi on Fri 21 Mar 2008 at 16:30

While creating AR extending plugin, I had some trouble to test it. Because testing a such plugin needs creating db and its absurd. So here's my solution. 

Tip #1: First, extend the AR, and name it as a MockBase. Then extend MockBase to test your class. This prevents other tests like your rails app or other plugins from failing.

Tip #2. Requiring environment.rb loads all rails env this includes AR. Thus you can you use AR in your test class.

   1  #acts_as_notifiable_test.rb
   2  begin
   3    require File.dirname(__FILE__) + '/../../../../config/environment'
   4  rescue LoadError
   5    require 'rubygems'
   6    gem 'activerecord'
   7    require 'active_record'
   8  end
   9  
  10  class MockBase < ActiveRecord::Base; end
  11  MockBase.class_eval do
  12    alias_method :save, :valid?
  13    def self.columns() @columns ||= []; end
  14  
  15    def self.column(name, sql_type = nil, default = nil, null = true)
  16      columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type, null)
  17    end
  18  end
  19  
  20  class MockModel < MockBase
  21    acts_as_notifiable :callback => :after_create, :message => "hello", :recipients => "test@gmail.com"
  22  end
  23  
  24  class ActsAsNotifiableTest < Test::Unit::TestCase
  25    def test_option_message_string
  26      assert_equal "hello", MockModel.new.instance_eval{jabber_message}
  27    end

Reference

posted by Png hibi on Thu 20 Mar 2008 at 23:58

http://www.searchme.com/ が面白そうだったのでBetaテストに応募してみたのですが、 アカウントをもらえたので試してみました。

searchme.com.png

ベータテスト中のせいか、ちょっと動作が遅いのが気になりましたが、 画像を中心として何かを探す場合には、なかなか便利そうです。 上のスクリーンショットは、「Global Illumination」 というキーワードで検索したところです。

欲しいものリスト

  • マウスのホイールでスクロールするようにしてほしい
  • キーボードショートカットがほしい(hlで左右にスクロールとか)
  • 文字が読めるぐらいZoomできると別次元の使い方ができそう
  • 3倍ぐらい高速化してほしい
posted by Png genki on Thu 20 Mar 2008 at 17:58
Contents
分散マスターキー方式による認証
Followup: How to make RubyGems
GoogleDocsで文字数を数えるBookmarklet
小口現金
Railsを使っているビッグネーム by RailsWayの人
EdgeRailsがhas_one :throughに対応
当座借越
Can human keep to be human after CAPTCHA has broken?
How to mock ActiveRecord when testing your plugin
searchme.comを試してみた
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ