cd ~/gnu/GCALDaemon/bin
./password-encoder.sh
Your Google password: Googleアカウントのパスワードを入力します
Original password: 上で入力したパスワードが表示されます
Encoded password: xxxxxxxxxx ここで出てきた文字列を後ほど利用します
Sample configuration options for GCALDaemon:
file.google.password=xxxxxxxxxx
ldap.google.password=xxxxxxxxxx
notifier.google.password=xxxxxxxxxx
sendmail.google.password=xxxxxxxxxx
mailterm.google.password=xxxxxxxxxx
require 'spec_helper'
describe TestController do
describe "referer" do
it "google 検索からの流入かどうか判別するテスト" do
request.env["HTTP_REFERER"] = "http://www.google.co.jp/search?q=test"
get "referer"
response.should be_success
assigns[:engine].should == "google"
end
it "yahoo 検索からの流入かどうか判別するテスト" do
request.env["HTTP_REFERER"] = "http://search.yahoo.co.jp/search?p=test"
get "referer"
response.should be_success
assigns[:engine].should == "yahoo"
end
end
describe "ua" do
it "firefox を使っているかどうか判別するテスト" do
request.env["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 GTB6 (.NET CLR 3.5.30729)"
get "ua"
response.should be_success
assigns[:browser].should == "firefox"
end
it "IE を使っているかどうか判別するテスト" do
request.env["HTTP_USER_AGENT"] = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
get "ua"
response.should be_success
assigns[:browser].should == "ie"
end
end
end
Wisp:~ btm$ port variants perl5
perl5 has the variants:
perl5_10: use perl 5.10 instead of perl 5.8 or perl 5.12
* conflicts with perl5_12 perl5_8
[+]perl5_12: use perl 5.12 instead of perl 5.8 or perl 5.10
* conflicts with perl5_10 perl5_8
perl5_8: use perl 5.8 instead of perl 5.10 or perl 5.12
* conflicts with perl5_10 perl5_12
ajax 通信における post(本番) と get(開発時) の使い分け with firebugs
rfc には含まれていないのですが、IE系では get で指定できるURLの長さは2083文字という制限があります。たしかにそれくらいの長さになるドメインやディレクトリはとても考えづらく、それくらい長いパラメータをつけるならpostにしろよ、というのは極々当たり前の常識的な判断ですので、特に疑問や憤りを覚えず他のブラウザの場合でも素直に従うべきでしょう。