2008-07-16から1日間の記事一覧

gearsonrails - Google Code

We need Goolge Gears also installed on your system. You would be prompted to install Google Gears when you first time vist this web application if you havn't install it. Now I am playing as a Rails programmer, who wants to make an offline …

ruby(on rails) で四捨五入する方法 - 夜の Discovery

rails2.0 以降は active_support により Float が拡張されているため、Float#round を使って実現できる。 activesupport/lib/active_support/core_ext/float/rounding.rb のコメントより x = 1.337 x.round # => 1 x.round(1) # => 1.3 x.round(2) # => 1.34…

X.509証明書を表示するRubyスクリプト - rubyco(るびこ)の日記

証明書(公開鍵にデジタル署名を施したもの)を表示するRubyスクリプトです。ファイルbobby.cerに証明書が入っているものとします。 # show_cert.rb require 'openssl' cert = OpenSSL::X509::Certificate.new(File.open('bobby.cer')) print cert.to_text …

5分でわかるRack - Greenbear Diary (2008-07-16)

5分でわかるRackRackはRubyのためのWebサーバインターフェイスだ。 RubyでWebっていうとRailsが有名だけど、実はRails以外にもいろんなRuby用のWebアプリ用フレームワークが存在する。 Ramaze Merb Camping Waves などなど…。 一方Webを実際に動かすにはWeb…

ニコニコ動画のダウンローダ - rubyco(るびこ)の日記

ニコニコ動画にアクセスするnicovideoパッケージをgemでインストールすると、sample/nv_download.rb というファイルも入手できます。それを読んで勉強。で、nv_download.rbをもとにしてnico.rbを書きました。nv_download.rbの劣化コピーですみません。でも、…

RubyGems Documentation Indexを読む(gem_server) - rubyco(るびこ)の日記

たとえば、gemでamazon-ecsパッケージをインストールします。 > gem install amazon-ecs Need to update 7 gems from http://gems.rubyforge.org ....... complete Successfully installed amazon-ecs-0.5.3 Installing ri documentation for amazon-ecs-0.5…

- suzukyuの勉強日記

BTS, MacretrospectivaのStableを入れてみたが、日本語対応してなかったので、Developmentを入れてみる。Railsのバージョンアップretrospectivaの最新版はrails 2.0.2を要求するので、railsをアップデートする。 $ sudo gem update rails Password: Updating…

QRコードを出力するためのRubyクラス(Google Chart API) | やむにやまれず

Google Chart APIでQRコードが出せるって言うので、簡単なクラスを書いてみた。rhtmlの中なんかで、以下のような1行を書くとimgタグが出力される。<%= Qr.new('http://axsh.jp').to_img %>imgタグまで世話をしなくても良いです、と思ったら、以下でGoogl…

Greenbear Laboratory - Rack日本語リファレンス

http://mono.kmc.gr.jp/~yhara/w/?RackReferenceJa http://b.hatena.ne.jp/entry/http://mono.kmc.gr.jp/~yhara/w/?RackReferenceJa