2005-01-01から1年間の記事一覧
require 'webrick' config = { :DocumentRoot => '.', :AccessLog => [ [ $stderr, WEBrick::AccessLog::COMBINED_LOG_FORMAT ], ], } server = WEBrick::HTTPServer.new(config) trap("INT") { server.shutdown } # Ctrl + C で shutdown server.start 参考…
はてなブックマークAtomAPI/はてなフォトライフAtomAPI で使用するWSSE認証のHTTP X-WSSEヘッダを作成するRubyスクリプト $KCODE = 'u' require 'time' require 'digest/sha1' def hatena_wsse_header(hatena_id, password) # Nonce : HTTPリクエスト毎に生…
はてなブックマークAtomAPI FeedURIを使用して全ブックマークを取得するRubyスクリプト require 'hatena_wsse_header' は d:id:toward:20051225:ruby_hatena_wsse #!/usr/local/bin/ruby -w $KCODE = 'u' require 'net/http' Net::HTTP.version_1_2 require …
Ruby XMLRPC4R(標準添付ライブラリ)を使用したはてなブックマーク件数取得APIのサンプル XMLRPC::Client#call - 例外が発生するバージョン #!/usr/local/bin/ruby -w require 'xmlrpc/client' end_point = 'http://b.hatena.ne.jp/xmlrpc' urls = [ 'http://…
Source Code depot8〜 8.3 Iteration C1: Creating a Cart File 74 の model :cart model :line_itemがないと File 81 が正しく動作しなくなる。
Source Code depot5〜depot7
Source Code depot1〜depot4 6.1 Iteration A1: Get Something Running Create a Rails Application toward@localmachine ~/rails $ rails depot toward@localmachine ~/rails $ cd depot/ Configure the Application (順番入れ替え) MySQL Administratorで…