2014年1月5日日曜日

amazonのProduct Advertising APIメモ


確認ページ
http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html

※Unsigned URL: に
http://ecs.amazonaws.jp/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=[アクセスキー]&Operation=ItemSearch&Version=2009-07-01&AssociateTag=yaju55595472c-22&SearchIndex=Music&Keywords=casiopea mint jams


参考
http://d.hatena.ne.jp/WorldWorldWorld/201308
https://images-na.ssl-images-amazon.com/images/G/09/associates/paapi/dg/index.html?AnatomyOfaRESTRequest.html
http://www.ajaxtower.jp/ecs/itemsearch/index1.html
http://www.ajaxtower.jp/ecs/itemsearch/index2.html
http://yukihariguchi.com/product-advertising-api-basics/
サンプルコード
http://aws.amazon.com/code

2014年1月4日土曜日

VPS上のCentOSのPostgreSQL 8.1.23にyumでTSearch2の設定とか

PostgreSQLのバージョンを上げればいいんだけど、そのDB上で別のシステムが動いているとかでちょっと面倒だったんで。

yum install postgresql-contrib

ここにインストールされる。
/usr/share/pgsql/contrib

psql -f /usr/share/pgsql/contrib/tsearch2.sql DB名

とすることで、関係する関数がインストールされる。
psql後、

\df
で、関数インストール確認

参考
http://blog.fusic.co.jp/archives/954
http://php.y-110.net/wiki/index.php?PostgreSQL%A1%A7Tsearch2%20%2B%20%C6%FC%CB%DC%B8%EC%B2%BD%A5%D1%A5%C3%A5%C1%A4%CE%C1%B4%CA%B8%B8%A1%BA%F7

application.rb の変更

アプリ固有の設定値を application.rb に書き込んだんだけど反映されず。
なんでやねん、と思ったら、webサーバ再起動で反映。

悩んだよ……そんなもんですか。
ちなみに、Passenger使ってapacheをwebサーバとしてる環境でのお話。

普通は WEBrick で開発するなら、サーバの再起動とかは頻繁にしているから気にならないのかな?


http://qa.atmarkit.co.jp/q/2212
http://sugamasao.hatenablog.com/entry/20100912/1284299997