2007-12-01から1ヶ月間の記事一覧

Flashの実行環境をswfの置き場所で切り替える。

どこにswfが置かれているかでenvの値を変えるスクリプト。 String.prototype.startsWith = function(str){ return !this.indexOf(str); } String.prototype.endsWith = function(str){ return this.lastIndexOf(str) == this.length-str.length; } var env =…

Rubyのバージョンを出力する。

--version みたいなフォーマットで。 puts "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]" railsはscript/aboutでバージョンの一覧を見ることができる。 $ ./script/about About your application's envi…