<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1123743929918981950</id><updated>2024-09-06T02:04:49.301+09:00</updated><category term="other"/><category term="Weblog"/><category term="WebDevelopment"/><category term="ソフト"/><category term="Sledge"/><category term="Technology"/><category term="News"/><category term="book"/><category term="ハード"/><category term="Webツール"/><category term="FlipClip"/><category term="amazon web service"/><category term="グルメ"/><category term="Amazon Keyword Search"/><category term="Class::DBI"/><category term="JavaScript"/><category term="MIME::Lite::TT::Japanese"/><category term="Perl"/><category term="RDS"/><category term="python"/><category term="CPAN"/><category term="Flash"/><category term="Gmail"/><category term="MT"/><category term="MovableType"/><category term="mod_perl"/><category term="postgres"/><category term="Google"/><category term="タブブラウザ"/><category term="プラグイン"/><category term="文字化け"/><category term="甘いもの"/><category term="API"/><category term="Amazonウェブサービス"/><category term="Bloglines"/><category term="Class::Date"/><category term="FormValidator::Simple"/><category term="GoogleAdsense"/><category term="HTML"/><category term="Jcode"/><category term="LLDN"/><category term="Mac"/><category term="MySQL"/><category term="MySQL4.1"/><category term="Perlモジュール"/><category term="Plugin"/><category term="Prototype"/><category term="Prototype.js"/><category term="RSS"/><category term="Sledge::Template::TT::Shift_JIS"/><category term="Sleipnir"/><category term="TT"/><category term="Template::Plugin::TagRescue"/><category term="Thunderbird"/><category term="Validator"/><category term="WSSE"/><category term="amazon"/><category term="django"/><category term="invitation"/><category term="mixi"/><category term="opensocial"/><category term="ゲーム"/><category term="サーバ管理"/><category term="シムソンズ"/><category term="ムービーブログ"/><category term="ラーメン"/><category term="&quot;Insertion test failed on SQL error ERROR: value too long for type character varying(50)&quot;"/><category term="0"/><category term="05"/><category term="3G"/><category term="5.6から5.8"/><category term="AWS Keyword Search"/><category term="Acme::MorningMusume"/><category term="ActionScript"/><category term="AdobeがMacromediaを買収"/><category term="Ajax"/><category term="Apache::Reload"/><category term="Atom"/><category term="AtomAPI"/><category term="BSD HACKS"/><category term="BWS"/><category term="Bidders Keyword Search"/><category term="BlogHackersConference2005"/><category term="Bundle"/><category term="CSSクックブック"/><category term="Catalyst"/><category term="Class::DBI::DTO"/><category term="Class::Field"/><category term="CoQ10"/><category term="Config"/><category term="DBD::mysql2.9005_3"/><category term="DBDesigner4"/><category term="DOM"/><category term="Date::Simple::Month"/><category term="Dreamweaver"/><category term="Dreamweaver8"/><category term="Editor"/><category term="Encode"/><category term="Extreme Perl"/><category term="FAQ"/><category term="FINALFANTASY"/><category term="FLV"/><category term="Factoryパターン"/><category term="Feed"/><category term="Fire File Copy"/><category term="FlashVideo"/><category term="FlilpClip"/><category term="Foo-conf.pl"/><category term="FreeBSD"/><category term="GDS"/><category term="Google Desktop Search"/><category term="Google Suggest"/><category term="GoogleMaps"/><category term="Googleデスクトップ検索日本語版"/><category term="Goole talk"/><category term="I18N"/><category term="IE6"/><category term="IM"/><category term="InternetWeek2004"/><category term="JSON"/><category term="JSON::Syck"/><category term="K-1"/><category term="LLW"/><category term="LWP"/><category term="Lightweight Language Day and Night"/><category term="Linux"/><category term="Location"/><category term="MFPM"/><category term="MIME::Lite::TT"/><category term="MIME::Lite::TT::Japanexe"/><category term="MSNメッセンジャー"/><category term="MT3.1"/><category term="Macbook"/><category term="Macromedia"/><category term="MaxClients"/><category term="Microsoft Wireless Notebook Optical Mouse マイカブラック"/><category term="Movable Type"/><category term="MovableType3.2"/><category term="Movie"/><category term="My Favorite Perl Module"/><category term="Net::Amazon"/><category term="OSX"/><category term="OpenPNE"/><category term="PDF HACKS"/><category term="PHPObject"/><category term="POP"/><category term="PORTABLEMEDIAEXPO"/><category term="PRIDE"/><category term="PS2"/><category term="PSP"/><category term="Path::Class"/><category term="Perlクックブック"/><category term="Perlクックブック第2版"/><category term="Podcast"/><category term="Poderosa"/><category term="PostgreSQL"/><category term="PostgreSQL8.0"/><category term="RDBMS解剖学 よくわかるリレーショナルデータベースの仕組み"/><category term="REST"/><category term="Reading from filehandle failed"/><category term="SMTP"/><category term="SSL"/><category term="Shibuya Perl Mongers テクニカルトーク #5"/><category term="Sledge::Plugin::JavaScript::DocumentWrite"/><category term="Sledge::Plugin::SaveUploadImage"/><category term="Slege::Plugin::SaveUploadImage"/><category term="SpamAssassin"/><category term="Storable"/><category term="TDD"/><category term="TechnoratiJapan"/><category term="Template::Plugin::Dumper"/><category term="Template::Toolkit"/><category term="Tmplate::Toolkit"/><category term="UI"/><category term="UserAgent"/><category term="VMware v5.0"/><category term="Vodafone"/><category term="WEB+DB PRESS特別総集編"/><category term="WEBプログラマ"/><category term="WHR3-AG54/P"/><category term="Web Developer"/><category term="Web2.0"/><category term="Webアプリケーション"/><category term="Webアプリケーション開発手法"/><category term="Webサービス"/><category term="Web標準化"/><category term="WindowsXP"/><category term="XML HACKS"/><category term="XML-RPC"/><category term="XMLRPC"/><category term="XP"/><category term="YAML"/><category term="ZIKO"/><category term="ad"/><category term="akamai"/><category term="amaztype"/><category term="apache"/><category term="bidders"/><category term="centos"/><category term="colinux"/><category term="debian"/><category term="dovecot"/><category term="encodingプラグマ"/><category term="ffmpeg"/><category term="firefox"/><category term="gentoo"/><category term="git"/><category term="gonzui"/><category term="google golf"/><category term="googlesitemap"/><category term="iPod"/><category term="iモード"/><category term="jquery"/><category term="livedoor"/><category term="livedoorBlog"/><category term="livedoorReader"/><category term="make test"/><category term="mixi プレミアム"/><category term="mixiアプリ"/><category term="mod_perlで動かない"/><category term="nofollow"/><category term="online"/><category term="perl5.8.6"/><category term="perlval"/><category term="picasa"/><category term="rel=&quot;nofollow&quot;"/><category term="selenium"/><category term="shibuya.pm"/><category term="stable"/><category term="svk"/><category term="trackback spam"/><category term="vcube"/><category term="vmware"/><category term="　求人"/><category term="かにみそ"/><category term="ぐっさん"/><category term="これだけは知っておきたい個人情報保護"/><category term="ちらりウィンドウ（マウス用）"/><category term="とんかつ和幸"/><category term="はてな"/><category term="はてなフォトライフ"/><category term="はてなフォトライフデスクトップ"/><category term="はてなブックマーク"/><category term="ひどい"/><category term="イベントモデル"/><category term="インストール"/><category term="インドカレー"/><category term="ウイニングイレブン９"/><category term="エクストリーム・プログラミング"/><category term="エディタ"/><category term="エラー"/><category term="ギリシャ"/><category term="コネクションプーリング"/><category term="コメントスパム"/><category term="コメントスパム対策"/><category term="コンテンツビジネスセミナー"/><category term="ゴッゴル"/><category term="ジンギスカン"/><category term="セッション"/><category term="セッション管理"/><category term="ソースコード検索エンジン"/><category term="タグ"/><category term="タージマハール蒲田店"/><category term="ツール"/><category term="ティングラー"/><category term="テスト"/><category term="データベース"/><category term="トラックバックスパム"/><category term="トラブル"/><category term="トリック"/><category term="ドラクエ8"/><category term="ドラクエ８"/><category term="ドラゴンクエストVIII"/><category term="ネットワーク設定"/><category term="ハンバーガー"/><category term="バージョンアップ"/><category term="バージョン確認"/><category term="パスワード"/><category term="パスワード生成"/><category term="パッチ"/><category term="パフォーマンス"/><category term="パフォーマンスチューニング"/><category term="ビッダーズWebサービス"/><category term="ピンポン"/><category term="ブラウズノード"/><category term="ブログを借りる前にここを読め"/><category term="ベトナム料理"/><category term="ベルリンの至宝展"/><category term="ページが移動しました"/><category term="ミレイ"/><category term="モツ鍋"/><category term="モデリングツール"/><category term="ラストサムライ"/><category term="リニューアル"/><category term="ループ"/><category term="ワイヤレス光学式マウス"/><category term="ヴィレッジ"/><category term="仕事"/><category term="仲間由紀恵"/><category term="保存できない"/><category term="個人情報保護"/><category term="健康"/><category term="再生できない"/><category term="割り算"/><category term="台北"/><category term="山口智充"/><category term="恐竜博2005"/><category term="技術者というのは"/><category term="文字列の連結"/><category term="新婚旅行"/><category term="旅行"/><category term="日本語訳"/><category term="映画化"/><category term="最もセキュアなOS"/><category term="有効範囲"/><category term="有料サービス"/><category term="検索対象ページ倍増"/><category term="正規表現"/><category term="武骨"/><category term="求人"/><category term="無線LAN"/><category term="発表"/><category term="社員募集"/><category term="秀丸5"/><category term="筋肉痛"/><category term="簡略化"/><category term="紙2001"/><category term="脆弱性"/><category term="自作モジュール"/><category term="色別写真一覧"/><category term="蒲田"/><category term="角を丸くする"/><category term="解体工事"/><category term="認証"/><category term="迷惑メールフィルタ"/><category term="雑誌"/><category term="電池が必要ない"/><category term="電車男"/><category term="鳥小屋"/><category term="麺屋武蔵"/><title type='text'>blog.hori-uchi.com</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>401</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-8389254440640565735</id><published>2010-10-13T15:57:00.006+09:00</published><updated>2010-10-13T16:28:22.291+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><category scheme="http://www.blogger.com/atom/ns#" term="book"/><title type='text'>Amazon Web Servicesによるソーシャルアプリ運用ノウハウ大公開</title><content type='html'>&lt;a href=&quot;http://gihyo.jp/magazine/SD/archive/2010/201011&quot;&gt;Software Design 2010年11月号&lt;/a&gt;にて、第1特集の「Amazon事例，国内新サービスから学ぶクラウド時代のシステム管理」の3章、「Amazon Web Servicesによるソーシャルアプリ運用ノウハウ大公開」という記事を執筆しました。&lt;br /&gt;弊社がAWSを使いはじめたきっかけ、運用のポイント等をまとめてあります。&lt;br /&gt;&lt;br /&gt;また、第1特集の1、2章は弊社SREの石川が執筆してます。&lt;br /&gt;こちらも弊社のAWS運用ノウハウをそのまま公開しています。&lt;br /&gt;&lt;br /&gt;10月18日発売です!&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;amazlet-box&quot; style=&quot;margin-bottom:0px;&quot;&gt;&lt;div class=&quot;amazlet-image&quot; style=&quot;float:left;margin:0px 12px 1px 0px;&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/B0044Z34Y6/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/61GZJjno%2BoL._SL160_.jpg&quot; alt=&quot;Software Design (ソフトウェア デザイン) 2010年 11月号 [雑誌]&quot; style=&quot;border: none;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-info&quot; style=&quot;line-height:120%; margin-bottom: 10pjavascript:void(0)x&quot;&gt;&lt;div class=&quot;amazlet-name&quot; style=&quot;margin-bottom:10px;line-height:120%&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/B0044Z34Y6/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;Software Design (ソフトウェア デザイン) 2010年 11月号 [雑誌]&lt;/a&gt;&lt;div class=&quot;amazlet-powered-date&quot; style=&quot;font-size:80%;margin-top:5px;line-height:120%&quot;&gt;posted with &lt;a href=&quot;http://www.amazlet.com/browse/ASIN/B0044Z34Y6/horiuchiweblo-22/ref=nosim/&quot; title=&quot;Software Design (ソフトウェア デザイン) 2010年 11月号 [雑誌]&quot; target=&quot;_blank&quot;&gt;amazlet&lt;/a&gt; at 10.10.13&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-detail&quot;&gt;&lt;br /&gt;技術評論社 &lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-sub-info&quot; style=&quot;float: left;&quot;&gt;&lt;div class=&quot;amazlet-link&quot; style=&quot;margin-top: 5px&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/B0044Z34Y6/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;Amazon.co.jp で詳細を見る&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-footer&quot; style=&quot;clear: left&quot;&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/8389254440640565735/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/10/amazon-web-services.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/8389254440640565735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/8389254440640565735'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/10/amazon-web-services.html' title='Amazon Web Servicesによるソーシャルアプリ運用ノウハウ大公開'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-5160841434676319604</id><published>2010-07-07T12:55:00.002+09:00</published><updated>2010-07-07T12:58:58.042+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Amazonウェブサービス"/><title type='text'>第3回 AWS User Group - Japan 勉強会 で 発表します</title><content type='html'>本日開催の&lt;a href=&quot;http://atnd.org/events/6076&quot;&gt;第3回 AWS User Group - Japan 勉強会&lt;/a&gt;で「AWSによるソーシャルアプリ運用事例」という題で、発表してきます。&lt;br /&gt;&lt;br /&gt;gumiが運用しているソーシャルゲームの実際のサーバ構成やどうしてAWSを使うに至ったのかというような話をできればと思ってます。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/5160841434676319604/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/07/3-aws-user-group-japan.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5160841434676319604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5160841434676319604'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/07/3-aws-user-group-japan.html' title='第3回 AWS User Group - Japan 勉強会 で 発表します'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-769860940258911879</id><published>2010-07-06T16:58:00.007+09:00</published><updated>2010-07-06T17:30:38.787+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><category scheme="http://www.blogger.com/atom/ns#" term="RDS"/><title type='text'>Amazon RDS で肥大化したslow_logテーブルをクリアする方法</title><content type='html'>以前&lt;a href=&quot;http://blog.hori-uchi.com/2009/11/amazonrdsslow-query.html&quot;&gt;AmazonRDSでslow queryを出力するようにする方法&lt;/a&gt;にてRDSでslow_logを出力するように設定すると、mysqlデータベースのslow_logテーブルにログが保存されるようになるのですが、このテーブルに保存されたデータは、RDSで作成できるユーザーの権限では削除することができません。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql&gt; delete from slow_log;&lt;br /&gt;ERROR 1556 (HY000): You can&#39;t use locks with log tables.&lt;br /&gt;mysql&gt; truncate table slow_log;&lt;br /&gt;ERROR 1044 (42000): Access denied for user &#39;xxxx&#39;@&#39;%&#39; to database &#39;mysql&#39;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;このことはgeneral_logにも言えるのですが、&lt;br /&gt;これに対して、Amazonから以下のストアドプロシージャが提供されています。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql.rds_rotate_general_log&lt;br /&gt;mysql.rds_rotate_slow_log &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;この2つのストアドプロシージャは新規、既存のものを含めて全てのRDSインスタンスで使用可能で、以下のようにCALL文により実行できます。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CALL mysql.rds_rotate_general_log;&lt;br /&gt;CALL mysql.rds_rotate_slow_log; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;プロシージャの中身はこんな感じです。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql&gt; show create procedure rds_rotate_slow_log \G&lt;br /&gt;*************************** 1. row ***************************&lt;br /&gt;           Procedure: rds_rotate_slow_log&lt;br /&gt;            sql_mode: &lt;br /&gt;Create Procedure: CREATE DEFINER=`rdsadmin`@`localhost` PROCEDURE `rds_rotate_slow_log`()&lt;br /&gt;    READS SQL DATA&lt;br /&gt;    DETERMINISTIC&lt;br /&gt;BEGIN&lt;br /&gt;  CREATE TABLE IF NOT EXISTS mysql.slow_log2 LIKE mysql.slow_log;&lt;br /&gt;  DROP TABLE IF EXISTS mysql.slow_log_backup;&lt;br /&gt;  RENAME TABLE mysql.slow_log TO mysql.slow_log_backup, mysql.slow_log2 TO mysql.slow_log;&lt;br /&gt;END&lt;br /&gt;character_set_client: latin1&lt;br /&gt;collation_connection: latin1_swedish_ci&lt;br /&gt;  Database Collation: latin1_swedish_ci&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;slow_logと同じスキーマのテーブル、slow_log2を作成し、既存のslow_logテーブルをslow_log_backupに、slow_log2をslow_logにリネームするという作業を行っています。&lt;br /&gt;この際、slow_log_backupテーブルがすでに存在していればDROPしているので、この関数を2回呼ぶと、1回目にバックアップしたデータはなくなってしまうので注意が必要です。&lt;br /&gt;&lt;br /&gt;また上記の2つのプロシージャの他にKILL、KILL QUERYを実行できる以下の2つも用意されています。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql.rds_kill&lt;br /&gt;mysql.rds_kill_query&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/769860940258911879/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/07/amazon-rds-slowlog.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/769860940258911879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/769860940258911879'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/07/amazon-rds-slowlog.html' title='Amazon RDS で肥大化したslow_logテーブルをクリアする方法'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-7847082806420772044</id><published>2010-06-30T14:28:00.002+09:00</published><updated>2010-06-30T18:23:20.548+09:00</updated><title type='text'>Python × Django × AWSで作るソーシャルアプリ～3日に1つアプリをリリースできた理由～</title><content type='html'>今日の19:30から「Python × Django × AWSで作るソーシャルアプリ～3日に1つアプリをリリースできた理由～」という題目で話をしてきます。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;まだ空いてますので、お暇な方はぜひ!&lt;br /&gt;&lt;a href=&quot;http://atnd.org/events/4846&quot;&gt;http://atnd.org/events/4846&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/7847082806420772044/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/06/python-django-aws31.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7847082806420772044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7847082806420772044'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/06/python-django-aws31.html' title='Python × Django × AWSで作るソーシャルアプリ～3日に1つアプリをリリースできた理由～'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-4384142859849661754</id><published>2010-06-14T10:53:00.002+09:00</published><updated>2010-06-14T10:59:07.407+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><category scheme="http://www.blogger.com/atom/ns#" term="RDS"/><category scheme="http://www.blogger.com/atom/ns#" term="発表"/><title type='text'>第2回 AWS User Group - Japan 勉強会 で LTします。</title><content type='html'>今日行われる&lt;br /&gt;&lt;a href=&quot;http://jaws-ug.jp/events/2zcqpf&quot;&gt;第2回 AWS User Group - Japan 勉強会 - 6/14(月) &lt;/a&gt;&lt;br /&gt;で「RDS multi AZ 早速試しました」というタイトルで、RDSとMulti-AZについて話をしてきます。&lt;br /&gt;&lt;br /&gt;Mult-AZ機能が搭載されて、実運用にも十分耐えれるようになったRDSについて、簡単に話をしようと思ってます。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/4384142859849661754/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/06/2-aws-user-group-japan-lt.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4384142859849661754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4384142859849661754'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/06/2-aws-user-group-japan-lt.html' title='第2回 AWS User Group - Japan 勉強会 で LTします。'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-3656337474684372989</id><published>2010-05-18T12:40:00.005+09:00</published><updated>2010-05-18T17:42:46.201+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon"/><category scheme="http://www.blogger.com/atom/ns#" term="RDS"/><title type='text'>もう止まらない。Amazon RDS Multi-AZ Deployments機能をリリース</title><content type='html'>本日、Amazon RDSの新機能、 Multi-AZ Deploymentsがリリースされました。&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3815&amp;categoryID=291&quot;&gt;Release: Amazon Relational Database Service on 2010-05-17&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;これにより、RDSのダウンタイムがほぼ0になるという素敵な機能です!&lt;br /&gt;&lt;br /&gt;Multi-AZ deploymentを有効にするとプライマリDBとは別のAvailability Zoneにホットスタンバイとしてレプリカが作成されます。&lt;br /&gt;レプリカはプライマリDBと同期していて、プライマリDBが止まると自動的にレプリカにスイッチします。&lt;br /&gt;フェイルオーバーの仕組みはシンプルで、CNAMEレコードを変更し、スタンバイDBに向けるだけです。&lt;br /&gt;&lt;br /&gt;スタンバイDBに切りかわるタイミングは以下のとおりです。&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Availabilyty Zoneが落ちた時&lt;/li&gt;&lt;br /&gt; &lt;li&gt;プライマリDBが落ちた時&lt;/li&gt;&lt;br /&gt; &lt;li&gt;DBのスケールを変更した時&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ソフトウェアにパッチを当てている時&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;DBのバックアップ時に発生していたI/Oフリーズもなくなるようです。たぶんレプリカの方でバックアップを取るようになるのでしょう。&lt;br /&gt;&lt;br /&gt;また、レプリカには直接アクセスすることができないので、Read Onlyなクエリをレプリカに逃がすというスケールアウト的な使い方はできません。&lt;br /&gt;&lt;br /&gt;忘れてはならないコストですが、利用料は倍になります。&lt;br /&gt;インスタンスが二つになるのでしょうがないと言えばしょうがないですね。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Multi-AZを適用する方法はすごく簡単です。&lt;br /&gt;&lt;br /&gt;まずは以下から最新版のコマンドラインツールをダウンロードして使えるようにします。&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2928&amp;categoryID=294&quot;&gt;Amazon RDS Command Line Toolkit&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;バージョンが1.1.004ならOKです。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-version&lt;br /&gt;Relational Database Service CLI version 1.1.004 (API 2010-01-01)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;あとは以下のコマンドを叩くだけで既存のインスタンスにMulti-AZ 機能を適用できます。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-modify-db-instance dbname --multi-az true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;既存のインスタンスに適用すると、適用中に数分DBがダウンすると書かれているので、実行するタイミングには注意が必要です。&lt;br /&gt;&lt;br /&gt;実際試してみたところ、このコマンドを実行するとインスタンスにPending MultAZフラグが立ちます。(rds-describe-db-instancesコマンドで確認できます。)&lt;br /&gt;僕の環境ではコマンド実行から数時間経過しましたがまだPending状態のままです。&lt;br /&gt;PendingからMulti-AZが有効の状態になるにはかなり時間がかかりそうです。&lt;br /&gt;&lt;br /&gt;Pendingの状態でもDBには接続できているので、準備ができて、実際に適用するタイミングでちょっとばかりアクセスできなくなるんだと思います。&lt;br /&gt;&lt;br /&gt;また、新規作成の際も--multi-azオプションを指定してやるだけみたいです。&lt;br /&gt;&lt;br /&gt;これでますますRDSが手放せなくなりそうです。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/3656337474684372989/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/05/amazon-rds-multi-az-deployments.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3656337474684372989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3656337474684372989'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/05/amazon-rds-multi-az-deployments.html' title='もう止まらない。Amazon RDS Multi-AZ Deployments機能をリリース'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-3952490021227622328</id><published>2010-05-06T17:21:00.005+09:00</published><updated>2010-05-06T18:10:14.066+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><category scheme="http://www.blogger.com/atom/ns#" term="RDS"/><title type='text'>RDS バックアップから復旧する方法</title><content type='html'>fooというRDSのインスタンスのバックアップからbarという新規インスタンスを作成する場合、以下のコマンドを実行する。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-restore-db-instance-to-point-in-time bar -s foo -l&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;-sでソースにする元のインスタンスの名前(ここではfoo)を指定し、-lで復元可能な最新の時刻のバックアップから復元することを指定する。&lt;br /&gt;&lt;br /&gt;復元時刻を指定する場合は、-rオプションを使用する。&lt;br /&gt;指定する時刻はUTC&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-restore-db-instance-to-point-in-time bar -s foo -r 2010-05-04T09:20:00Z&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;リストア可能な最終時間はrds-describe-db-instancesに--show-longを指定することで確認できる。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-describe-db-instances --show-long --headers&lt;br /&gt;DBINSTANCE,DBInstanceId,Created,Class,Engine,Storage,Master Username,Status,Endpoint Address,Port,AZ,Backup Retention,PendingBackupRetention,PendingClass,PendingCredentials,PendingStorage,DB Name,Mainte&lt;br /&gt;nance Window,Backup Window,Latest Restorable Time&lt;br /&gt;DBINSTANCE,foo,2010-02-22T10:07:04.933Z,db.m2.4xlarge,mysql5.1,20,owner,available,foo.xxxxxxx.us-east-1.rds.amazonaws.com,3306,us-east-1a,1,(nil),(nil),(nil),(nil),(nil),tue:05:00-mon:09:00,&lt;br /&gt;19:00-21:00,2010-05-06T08:45:00Z&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;見づらいが、一番最後の2010-05-06T08:45:00Zが復元可能な最終時刻になる。&lt;br /&gt;&lt;br /&gt;バックアップが行われるのは1日1回だけだが、バックアップ後のトランザクションが全部保存されているので、それを元に直近1分前程度の状態を復元可能。&lt;br /&gt;このため、バックアップから時間が経過していればしているほど、復元する際に時間がかかる。&lt;br /&gt;特にDBの更新が頻繁だと復元に時間がかかる。&lt;br /&gt;150 updates/sec程度の更新量で5時にバックアップを行っていた場合、9時に復元したところ、1時間程度、19時頃復元したところ、5時間くらいかかった。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/3952490021227622328/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/05/rds.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3952490021227622328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3952490021227622328'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/05/rds.html' title='RDS バックアップから復旧する方法'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-5449639146776411622</id><published>2010-03-29T00:16:00.000+09:00</published><updated>2010-03-29T00:17:27.502+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><title type='text'>EC2のインスタンスにpingを通すためのセキュリティグループの設定</title><content type='html'>&lt;pre&gt;&lt;br /&gt;ec2-authorize &lt;group name&gt; -P icmp -t -1:-1 -s 0.0.0.0/0&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/5449639146776411622/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/03/ec2ping.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5449639146776411622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5449639146776411622'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/03/ec2ping.html' title='EC2のインスタンスにpingを通すためのセキュリティグループの設定'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-4846158336700224116</id><published>2010-03-23T19:51:00.003+09:00</published><updated>2010-03-23T20:01:04.300+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Djangoのパーミッションテーブルを更新するスクリプト</title><content type='html'>Djangoでproxy modelというものを使って、ひとつのモデルを複数にわけて、&lt;br /&gt;管理するようにした際に、片方のモデルがadminのユーザーパーミッション一覧に&lt;br /&gt;表示されなくて困っていた。&lt;br /&gt;&lt;br /&gt;ユーザーパーミッションのテーブルを更新する方法がないかと&lt;br /&gt;調べてみるとこんなページを発見&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.djangosnippets.org/snippets/698/&quot;&gt;http://www.djangosnippets.org/snippets/698/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;これを参考にパーミッションを更新するスクリプトを書いてみた。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# -*- coding: utf-8 -*-&lt;br /&gt;from django.core.management.base import BaseCommand&lt;br /&gt;from django.contrib.contenttypes.management import update_all_contenttypes&lt;br /&gt;from django.contrib.auth.management import create_permissions&lt;br /&gt;from django.db.models import get_apps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&quot;&quot;&quot;&lt;br /&gt;パーミッションを更新する&lt;br /&gt;&quot;&quot;&quot;&lt;br /&gt;class Command(BaseCommand):&lt;br /&gt;    def handle(self, *args, **options):&lt;br /&gt;&lt;br /&gt;        # Add any missing content types&lt;br /&gt;        update_all_contenttypes()&lt;br /&gt;&lt;br /&gt;        # Add any missing permissions&lt;br /&gt;        for app in get_apps():&lt;br /&gt;            create_permissions(app, None, 2)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;これをインストール済みのアプリのmanagement/commands/syncpermissions.pyとして保存すれば、以下のコマンドで更新できる。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ python manage.py syncpermissions&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/4846158336700224116/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/03/django.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4846158336700224116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4846158336700224116'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/03/django.html' title='Djangoのパーミッションテーブルを更新するスクリプト'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-4120335299308103669</id><published>2010-02-22T10:44:00.003+09:00</published><updated>2010-02-22T10:58:22.149+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>gitでsubversionのようなショートカットを使えるようにする</title><content type='html'>重い腰をあげて「入門git」を読んでます。&lt;br /&gt;&lt;br /&gt;今までsvkと同じような感じでgit commit -aばかり使ってたんですが、&lt;br /&gt;ステージングエリアという概念を今さら知ったり、&lt;br /&gt;ファイルの変更の一部だけコミットできるんだということを知ったり、&lt;br /&gt;これもっと早く読んどけばよかったなーと、ちょっぴり後悔しています。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;そんな中でgitコマンドのショートカットの設定方法が書いてあったのでさっそく設定しました。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ git config --global alias.ci &quot;commit&quot;&lt;br /&gt;$ git config --global alias.stat &quot;status&quot;&lt;br /&gt;$ git config --global alias.co &quot;checkout&quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;これで、git ci で git commitが、 git stat でgit statusが、git coでgit checkoutが実行できるようになりました。&lt;br /&gt;快適。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/4120335299308103669/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/02/gitsubversion.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4120335299308103669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4120335299308103669'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/02/gitsubversion.html' title='gitでsubversionのようなショートカットを使えるようにする'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-6779195866760284966</id><published>2010-01-17T21:42:00.004+09:00</published><updated>2010-01-17T21:49:07.553+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><title type='text'>Amazon ELBを5つ以上作る方法</title><content type='html'>ELBはデフォルトでは1アカウントあたり5つまでしか作れない。&lt;br /&gt;&lt;br /&gt;それ以上作ろうとすると以下のように怒られる。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ elb-create-lb test-lb --availability-zones us-east-1d --listener &quot;protocol=HTTP, lb-port=80, instance-port=80&quot;&lt;br /&gt;elb-create-lb:  Malformed input-Exceeded quota of account xxxxxxxxxx&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;5つ以上作るためには、アマゾンに申請しないといけない。&lt;br /&gt;申請は下記のフォームから行える。&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://aws.amazon.com/contact-us/elb-request/&quot;&gt;http://aws.amazon.com/contact-us/elb-request/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/6779195866760284966/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2010/01/amazon-elb5.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/6779195866760284966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/6779195866760284966'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2010/01/amazon-elb5.html' title='Amazon ELBを5つ以上作る方法'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-6630208995514521522</id><published>2009-12-15T12:19:00.003+09:00</published><updated>2009-12-15T12:29:16.155+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="opensocial"/><title type='text'>Shindig + Partuzaでキャッシュさせない設定</title><content type='html'>Shindig + Partuzaで開発するならキャッシュ機能をオフにしないと不便。&lt;br /&gt;Shindig,Partuzaの両方ともキャッシュに関する設定があるので、両方ともオフにする。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Shindig (PHP版)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;cache_timeを0に設定する。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ cat /path/to/shindig/php/config/local.php&lt;br /&gt;&#39;PartuzaService&#39;,&lt;br /&gt;                     &#39;activity_service&#39; =&gt; &#39;PartuzaService&#39;,&lt;br /&gt;                     &#39;app_data_service&#39; =&gt; &#39;PartuzaService&#39;,&lt;br /&gt;                     &#39;messages_service&#39; =&gt; &#39;PartuzaService&#39;,&lt;br /&gt;                     &#39;oauth_lookup_service&#39; =&gt; &#39;PartuzaOAuthLookupService&#39;,&lt;br /&gt;                     &#39;extension_class_paths&#39; =&gt; &#39;/Library/WebServer/Documents/partuza/Shindig&#39;,&lt;br /&gt;                     &lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;&#39;cache_time&#39; =&gt; 0,&lt;/span&gt;&lt;br /&gt;                     );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Partuza&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;こちらもcache_timeを0に設定する。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ cd /path/to/partuza/html/&lt;br /&gt;$ diff -u config.php.org config.php&lt;br /&gt;--- config.php.org      2009-12-15 12:27:12.000000000 +0900&lt;br /&gt;+++ config.php  2009-12-15 12:25:25.000000000 +0900&lt;br /&gt;@@ -20,7 +20,7 @@&lt;br /&gt;&lt;br /&gt;$config = array(&lt;br /&gt;// Language to use, used for gettext / setenv LC_ALL&lt;br /&gt;-&#39;language&#39; =&gt; &#39;en_US&#39;,&lt;br /&gt;+&#39;language&#39; =&gt; &#39;ja_JP&#39;,&lt;br /&gt;&lt;br /&gt;// prefix of where partuza lives, empty means it&#39;s /&lt;br /&gt;&#39;web_prefix&#39; =&gt; &#39;&#39;,&lt;br /&gt;@@ -58,7 +58,7 @@&lt;br /&gt;// If you use CacheStorageMemcache as caching backend, change these to the memcache server settings&lt;br /&gt;&#39;cache_host&#39; =&gt; &#39;localhost&#39;,&lt;br /&gt;&#39;cache_port&#39; =&gt; 11211,&lt;br /&gt;-&#39;cache_time&#39; =&gt; 24 * 60 * 60,&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;+&#39;cache_time&#39; =&gt; 0,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/6630208995514521522/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/12/shindig-partuza.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/6630208995514521522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/6630208995514521522'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/12/shindig-partuza.html' title='Shindig + Partuzaでキャッシュさせない設定'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-7220792670195827840</id><published>2009-12-14T16:08:00.003+09:00</published><updated>2009-12-14T16:17:43.718+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>デフォルトのストレージエンジンをInnoDBにする</title><content type='html'>LeopardにdmgからインストールしたMySQLのデフォルトのストレージエンジンがMyISAMだってことに最近気付いた。&lt;br /&gt;デフォルトのストレージエンジンを変更するにはmy.cnfでdefault-storage-engineを指定すればOK&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ sudo vi /etc/my.cnf&lt;br /&gt;$ cat /etc/my.cnf&lt;br /&gt;[mysqld]&lt;br /&gt;default-storage-engine=InnoDB&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;mysqlを再起動して、実際にInnoDBになったか確認&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ mysql -uroot&lt;br /&gt;mysql&gt; create database foo;&lt;br /&gt;mysql&gt; use foo&lt;br /&gt;mysql&gt; create table bar(id int not null);&lt;br /&gt;mysql&gt; show table status bar ¥G&lt;br /&gt;*************************** 1. row ***************************&lt;br /&gt;      Table: bar&lt;br /&gt;Create Table: CREATE TABLE `bar` (&lt;br /&gt; `id` int(11) NOT NULL&lt;br /&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/7220792670195827840/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/12/innodb.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7220792670195827840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7220792670195827840'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/12/innodb.html' title='デフォルトのストレージエンジンをInnoDBにする'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-1281968054567542265</id><published>2009-12-03T10:36:00.002+09:00</published><updated>2009-12-03T10:42:44.797+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL 主キーの追加・削除</title><content type='html'>忘れるのでメモ&lt;br /&gt;&lt;br /&gt;主キーの追加&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ALTER TABLE テーブル名 ADD PRIMARY KEY (カラム名1[,カラム名2...]);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;主キーの削除&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ALTER TABLE テーブル名 DROP PRIMARY KEY&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;削除時下のようなエラーがでたら制約を疑う&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;OperationalError: (1025, &quot;Error on rename of &#39;./foo/#sql-b6f_3958&#39; to &#39;./foo/bar&#39; (errno: 150)&quot;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;制約を確認&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql&gt; SHOW CREATE TABLE foo;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/1281968054567542265/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/12/mysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/1281968054567542265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/1281968054567542265'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/12/mysql.html' title='MySQL 主キーの追加・削除'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-8776683297844150009</id><published>2009-11-24T16:15:00.007+09:00</published><updated>2009-11-24T16:45:11.830+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon web service"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="RDS"/><title type='text'>AmazonRDSでslow queryを出力するようにする方法</title><content type='html'>AmazonRDSは、デフォルトの設定ではslow queryを出力するようになっていない。&lt;br /&gt;また、MySQLが動いているサーバにアクセスすることができないので、slow queryをログファイルに出力したとしてもそれを閲覧する術がない。&lt;br /&gt;RDSでも採用されているMySQL 5.1からは、slow queryをテーブルに保存できるようになったので、それを使う。&lt;br /&gt;&lt;br /&gt;方針&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;ログはテーブル(mysql.slow_log)に出力する。&lt;/li&gt;&lt;br /&gt;&lt;li&gt;実行に1秒以上かかったクエリを記録する&lt;/li&gt;&lt;br /&gt;&lt;li&gt;100行以上を読み込んだクエリを記録する&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;普通なら以下のオプションをmy.cnfに設定すればOK。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[mysqld]&lt;br /&gt;slow_query_log = ON&lt;br /&gt;long_query_time = 1.000&lt;br /&gt;log_output = TABLE&lt;br /&gt;min_examined_row_limit=100&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;RDSの場合は、db-parameter-groupを作成し、パラメータを編集し、db-instanceに適用する。&lt;br /&gt;今回はacme-param-grpというdb-parameter-groupを作成し、acmeというdb-instanceに適用する。&lt;br /&gt;&lt;br /&gt;db-parameter-groupを作成&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-create-db-parameter-group acme-param-grp -e MySQL5.1 -d &quot;parameter group for acme&quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;db-parameter-groupのパラメータを編集&lt;br /&gt;(log_outputはデフォルトでTABLEになっているので設定しない。設定しようとしてもできない)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-modify-db-parameter-group acme-param-grp \&lt;br /&gt;--parameters=&quot;name=slow_query_log, value=ON, method=immediate&quot; \&lt;br /&gt;--parameters=&quot;name=long_query_time, value=1, method=immediate&quot; \&lt;br /&gt;--parameters=&quot;name=min_examined_row_limit, value=100, method=immediate&quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;methodに指定できる値はimmediate もしくは pending-reboot&lt;br /&gt;&lt;br /&gt;編集したパラメータの確認&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-describe-db-parameters acme-param-grp --source user&lt;br /&gt;DBPARAMETER  long_query_time         1    user  integer  dynamic  true&lt;br /&gt;DBPARAMETER  min_examined_row_limit  100  user  integer  dynamic  true&lt;br /&gt;DBPARAMETER  slow_query_log          1    user  boolean  dynamic  true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;sourceに指定できる値はuser 、system、 engine-default&lt;br /&gt;&lt;br /&gt;db-parameter-groupをdb-instanceに適用&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-modify-db-instance acme --db-parameter-group-name=acme-param-grp&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;db-instanceを再起動&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-reboot-db-instance acme&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;db-instanceにdb-parameter-groupが適用されているか確認&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ rds-describe-db-instances&lt;br /&gt;DBINSTANCE  acme  2009-11-04T10:59:28.860Z  db.m1.large    mysql5.1  100  xxxx  available  acme.xxxxxxx.us-east-1.rds.amazonaws.com  3306  us-east-1d  1&lt;br /&gt;     SECGROUP  xxxx  active&lt;br /&gt;     PARAMGRP  acme-param-grp  in-sync&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;PARAMGRPがacme-param-grpになっていて、ステータスがin-syncになっていればOK。&lt;br /&gt;&lt;br /&gt;さらにmysqlにアクセスしパラメータが有効になっているか確認する。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mysql &gt; show global variables like &#39;slow_query_log&#39;;&lt;br /&gt;+----------------+-------+&lt;br /&gt;| Variable_name  | Value |&lt;br /&gt;+----------------+-------+&lt;br /&gt;| slow_query_log | ON    |&lt;br /&gt;+----------------+-------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; show global variables like &#39;long_query_time&#39;;&lt;br /&gt;+-----------------+----------+&lt;br /&gt;| Variable_name   | Value    |&lt;br /&gt;+-----------------+----------+&lt;br /&gt;| long_query_time | 1.000000 |&lt;br /&gt;+-----------------+----------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; show global variables like &#39;min_examined_row_limit&#39;;&lt;br /&gt;+------------------------+-------+&lt;br /&gt;| Variable_name          | Value |&lt;br /&gt;+------------------------+-------+&lt;br /&gt;| min_examined_row_limit | 100   |&lt;br /&gt;+------------------------+-------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/8776683297844150009/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/amazonrdsslow-query.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/8776683297844150009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/8776683297844150009'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/amazonrdsslow-query.html' title='AmazonRDSでslow queryを出力するようにする方法'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-5605396903513230602</id><published>2009-11-20T20:36:00.003+09:00</published><updated>2009-11-20T20:58:26.259+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Python 今日覚えたこと</title><content type='html'>utf-8な文字列を内部で扱う形式にデコードする際、&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;unicode_str = utf8_data.decode(&#39;utf-8&#39;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;とするとutf8_dataにデコードできないバイト列があった場合、UnicodeDecodeErrorの例外をだす。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;UnicodeDecodeError: &#39;utf8&#39; codec can&#39;t decode byte 0xb4 in position 1: unexpected code byte &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;デコードできない文字列を削除してしまっていいのなら&#39;ignore&#39;を引数で渡してやればよい。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;unicode_str = utf8_data.decode(&#39;utf-8&#39;, &#39;ignore&#39;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;さらにdecodeよりunicodeの方が高速らしい。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;unicode_str = unicode(utf8_data, &quot;utf-8&quot;, &#39;ignore&#39;) &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;エンコード、デコードの概念はPerlと同じなので理解しやすかった。&lt;br /&gt;&lt;br /&gt;参考&lt;br /&gt;&lt;a href=&quot;http://snippets.hachinos.net/lang/python/user/piro_suke/3/&quot;&gt;http://snippets.hachinos.net/lang/python/user/piro_suke/3/&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://snippets.hachinos.net/lang/python/user/piro_suke/3/&quot;&gt;http://d.hatena.ne.jp/methane/20090816/1250433407&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/5605396903513230602/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/python.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5605396903513230602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5605396903513230602'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/python.html' title='Python 今日覚えたこと'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-7067675638041754567</id><published>2009-11-18T18:39:00.002+09:00</published><updated>2009-11-18T18:44:06.390+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>saveをオーバーライドする時はforce_insert、force_updateを渡す</title><content type='html'>Djangoでdjango.db.Modelsのsaveメソッドをオーバーライドする際&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def save(self):&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;とすると、create()とget_or_create()で以下のようなエラーを吐いた。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TypeError: save() got an unexpected keyword argument &#39;force_insert&#39;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;saveにforce_insert,force_updateを渡すようにしないといけないらしい。&lt;br /&gt;正解はこう&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def save(self, force_insert=False, force_update=False):&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges&quot;&gt;http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;create() and get_or_create() will never update existing objects ¶&lt;br /&gt;&lt;br /&gt;In [8670] a change was made to both create() and get_or_create() that affects people in two ways:&lt;br /&gt;&lt;br /&gt;Firstly, if you have a custom save() method on your model and it is going to be called using create() or get_or_create(), you should make sure you accept the force_insert parameter (best to accept force_update as well, just like django.db.models.base.Model.save()). You don&#39;t have to do anything with these parameters, just pass them through to the Model.save() method. &lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/7067675638041754567/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/saveforceinsertforceupdate.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7067675638041754567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7067675638041754567'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/saveforceinsertforceupdate.html' title='saveをオーバーライドする時はforce_insert、force_updateを渡す'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-7383419260186511789</id><published>2009-11-17T14:52:00.003+09:00</published><updated>2009-11-17T15:13:04.739+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>urllib2でgzipされたデータを扱う</title><content type='html'>ここに書いてあった。&lt;br /&gt;&lt;a href=&quot;http://diveintomark.org/projects/misc/httpgzip.py.txt&quot;&gt;http://diveintomark.org/projects/misc/httpgzip.py.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;StringIOよりcStringIOのが高速でよいと聞いたのでそちらを使ってみる。&lt;br /&gt;それ以外はまるパクリ。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;import urllib2, gzip, cStringIO&lt;br /&gt;&lt;br /&gt;def get(uri):&lt;br /&gt;    request = urllib2.Request(uri)&lt;br /&gt;    request.add_header(&quot;Accept-encoding&quot;, &quot;gzip&quot;)&lt;br /&gt;    usock = urllib2.urlopen(request)&lt;br /&gt;    data = usock.read()&lt;br /&gt;    if usock.headers.get(&#39;content-encoding&#39;, None) == &#39;gzip&#39;:&lt;br /&gt;        data = gzip.GzipFile(fileobj=cStringIO.StringIO(data)).read()&lt;br /&gt;    return data&lt;br /&gt;&lt;br /&gt;if __name__ == &#39;__main__&#39;:&lt;br /&gt;    import sys&lt;br /&gt;    uri = sys.argv[1:] and sys.argv[1] or &#39;http://mixi.jp/&#39;&lt;br /&gt;    print get(uri)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/7383419260186511789/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/urllib2gzip.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7383419260186511789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/7383419260186511789'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/urllib2gzip.html' title='urllib2でgzipされたデータを扱う'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-4640260036737266804</id><published>2009-11-13T11:38:00.004+09:00</published><updated>2009-11-13T11:48:51.569+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL 外部キー制約の追加、削除</title><content type='html'>忘れるのでメモ&lt;br /&gt;&lt;br /&gt;MySQL 5.1で確認した。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;外部キー制約の確認&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;SHOW CREATE TABLE テーブル名;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;show create table bbs_thread;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;外部キー制約の追加&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;ALTER TABLE テーブル名 ADD FOREIGN KEY (制約を張りたいカラム) REFERENCES 張りたいテーブル(張りたいカラム);&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;alter table bbs_thread add foreign key (creator_id) references accounts_user(id);&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;外部キー制約の削除&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;ALTER TABLE テーブル名 DROP FOREIGN KEY 制約名;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ALTER TABLE bbs_thread drop foreign key creator_id_refs_id_75448b6c;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/4640260036737266804/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/mysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4640260036737266804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/4640260036737266804'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/mysql.html' title='MySQL 外部キー制約の追加、削除'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-5728156027921181957</id><published>2009-11-11T14:59:00.002+09:00</published><updated>2009-11-11T15:03:09.047+09:00</updated><title type='text'>Leopardでcapistrano</title><content type='html'>Leopardにはデフォルトでcapistranoが入っているが、バージョンが古いので、更新する&lt;br /&gt;&lt;br /&gt;$ sudo gem install capistrano&lt;br /&gt;&lt;br /&gt;複数環境にデプロイできるように。capistrano-extをインストールする&lt;br /&gt;&lt;br /&gt;$ sudo gem install capistrano-ext</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/5728156027921181957/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/11/leopardcapistrano.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5728156027921181957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/5728156027921181957'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/11/leopardcapistrano.html' title='Leopardでcapistrano'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-3302993231865206645</id><published>2009-10-26T19:26:00.003+09:00</published><updated>2009-10-26T19:33:26.451+09:00</updated><title type='text'>LeopardにPILをpipでインストール</title><content type='html'>$ pip install PIL&lt;br /&gt;&lt;br /&gt;とすると&lt;br /&gt;IOError: [Errno 2] No such file or directory: &#39;/Path/to/build/PIL/setup.py&#39;&lt;br /&gt;というエラーがでてインストールできない。&lt;br /&gt;&lt;br /&gt;ソースのURLを指定してインストール。&lt;br /&gt;&lt;br /&gt;$ pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz&lt;br /&gt;&lt;br /&gt;Jpeg support not availableとログに出た場合は、&lt;br /&gt;jpegを利用できるようにするために、libjpegをインストール&lt;br /&gt;&lt;br /&gt;$ wget http://www.ijg.org/files/jpegsrc.v7b.tar.gz&lt;br /&gt;$ tar zxvf jpegsrc.v7b.tar.gz&lt;br /&gt;$ cd jpeg-7&lt;br /&gt;$ ./configure&lt;br /&gt;$ make &amp;&amp; sudo make install&lt;br /&gt;&lt;br /&gt;そんでもいっかいpip&lt;br /&gt;&lt;br /&gt;$ pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz&lt;br /&gt;&lt;br /&gt;JPEG support ok とでればOK。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/3302993231865206645/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/10/leopardpilpip.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3302993231865206645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/3302993231865206645'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/10/leopardpilpip.html' title='LeopardにPILをpipでインストール'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-9051163135616398174</id><published>2009-10-22T15:08:00.005+09:00</published><updated>2009-10-22T16:02:42.149+09:00</updated><title type='text'>safari3でjTemplatesがうまく動かない問題を解決</title><content type='html'>jTemplatesのsetTemplateElementメソッドを使ってテンプレートをロードする際、テンプレートに日本語が含まれていると、safari3では何も表示されないという問題に遭遇。&lt;br /&gt;jQuery,jTemplatesのバージョンはそれぞれ現在最新の、1.3.2と0.7.8。&lt;br /&gt;&lt;br /&gt;原因を調べるため、jquery-jtemplates.jsを見てみると、なんのことはない、replaceの正規表現がうまくマッチせず、テンプレート内のコメント部分の除去がうまくいってないだけだった。&lt;br /&gt;&lt;br /&gt;具体的にはjquery-jtemplates.jsの中のjQuery.fn.setTemplateElement内にある下のコード。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;s = s.replace(/^&lt;\!\[CDATA\[([\s\S]*)\]\]&gt;$/im,&#39;$1&#39;);                                                                                                                                       &lt;br /&gt;s = s.replace(/^&lt;\!--([\s\S]*)--&gt;$/im, &#39;$1&#39;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;これがsafari3だとうまくマッチせず、&amp;lt;!--と--&amp;gt;が除去されず、そのままコメント扱いになり、表示されていなかった。&lt;br /&gt;&lt;br /&gt;とりあえず、上記コードを下記のように修正することで対応した。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;s = s.replace(/^&lt;\!\[CDATA\[/m, &#39;&#39;).replace(/\]\]&gt;$/m, &#39;&#39;).replace(/^&lt;\!--/m, &#39;&#39;).replace(/--&gt;$/m, &#39;&#39;);&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/9051163135616398174/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/10/safari3jtemplates.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/9051163135616398174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/9051163135616398174'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/10/safari3jtemplates.html' title='safari3でjTemplatesがうまく動かない問題を解決'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-164196306836811110</id><published>2009-09-14T16:47:00.016+09:00</published><updated>2009-09-14T17:40:07.406+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="mixiアプリ"/><category scheme="http://www.blogger.com/atom/ns#" term="opensocial"/><title type='text'>mixiアプリの表示領域(高さ)を調整する最適な方法</title><content type='html'>mixiアプリの開発をはじめてからずっと表示領域(高さ)の調節に悩まされていたのですが、下記の記述でうまく調整されるようになりました。&lt;br /&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;gadgets.window.adjustHeight($(document).height());&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;$(document).height()でjQueryを使ってdocumentの高さを取得し、&lt;br /&gt;コンテナの提供するgadgets.window.adjustHeightに渡すようにしています。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;そもそも、gadgets.window.adjustHeightは引数を渡さず実行すると、表示領域の高さを自動調整してくれるはずなので、引数なしで呼びだせばそれでOKなはずなのですが、これが結構うまく動作してくれません。&lt;br /&gt;その結果コンテンツが全て画面に入りきらずに、スクロールバーが表示されてしまい、見づらいし、使いずらいということになってしまいます。&lt;br /&gt;&lt;br /&gt;ここで問題なのが、開発環境と本番環境で挙動が異なるということで、&lt;br /&gt;僕の場合ローカルの開発環境(Partuza+Shindig)では高さの自動調整がうまく行くのに、mixi上で動作させると高さがうまく調整されずスクロールバーがでてしまうという現象になやみました。&lt;br /&gt;&lt;br /&gt;そこで上記の解決策です。jQueryで高さを取得することで、コンテナに依存しなくなるので、開発環境でも本番環境でも同じ挙動を得ることができるようになりました。&lt;br /&gt;&lt;br /&gt;コンテナが成熟してくればこの手の問題はある程度解決していくとは思いますが、コンテナ毎の微妙な差異というのは少なからず残るのではないかと思います。&lt;br /&gt;&lt;br /&gt;そのため、今回のようにコンテナに依存しないような方法を取るというのは、様々なプラットフォームで動かすアプリを作る時には考えなければいけないなと思います。</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/164196306836811110/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/09/mixi.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/164196306836811110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/164196306836811110'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/09/mixi.html' title='mixiアプリの表示領域(高さ)を調整する最適な方法'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-114690263431573304</id><published>2009-06-04T04:12:00.000+09:00</published><updated>2009-08-23T22:54:55.029+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>10日でおぼえるPython入門教室</title><content type='html'>CMSコミュニケーションズの寺田さんから「10日でおぼえるPython入門教室」を献本いただきました!&lt;br/&gt;どうもありがとうございます!!&lt;br/&gt;&lt;br/&gt;ちょうど僕の中で「Python」が熱くなっていたところだったんです!&lt;br/&gt;まさにベストなタイミング!&lt;br/&gt;&lt;br/&gt;10日目にはGoogle App Engineの使い方の解説もあるみたい。&lt;br/&gt;これからじっくり読んでみます。&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;amazlet-box&quot; style=&quot;margin-bottom:0px;&quot;&gt;&lt;div class=&quot;amazlet-image&quot; style=&quot;float:left;&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/4798118753/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://ecx.images-amazon.com/images/I/51iy-nMV8aL._SL160_.jpg&quot; alt=&quot;10日でおぼえる Python 入門教室&quot; style=&quot;border: none;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-info&quot; style=&quot;float:left;margin-left:15px;line-height:120%&quot;&gt;&lt;div class=&quot;amazlet-name&quot; style=&quot;margin-bottom:10px;line-height:120%&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/4798118753/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;10日でおぼえる Python 入門教室&lt;/a&gt;&lt;div class=&quot;amazlet-powered-date&quot; style=&quot;font-size:7pt;margin-top:5px;font-family:verdana;line-height:120%&quot;&gt;posted with &lt;a href=&quot;http://www.amazlet.com/browse/ASIN/4798118753/horiuchiweblo-22/ref=nosim/&quot; title=&quot;10日でおぼえる Python 入門教室&quot; target=&quot;_blank&quot;&gt;amazlet&lt;/a&gt; at 09.06.03&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-detail&quot;&gt;穂苅 実紀夫 寺田 学 中西 直樹 堀田 直孝 永井 孝 &lt;br /&gt;翔泳社 &lt;br /&gt;売り上げランキング: 5963&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-link&quot; style=&quot;margin-top: 5px&quot;&gt;&lt;a href=&quot;http://www.amazon.co.jp/exec/obidos/ASIN/4798118753/horiuchiweblo-22/ref=nosim/&quot; name=&quot;amazletlink&quot; target=&quot;_blank&quot;&gt;Amazon.co.jp で詳細を見る&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;amazlet-footer&quot; style=&quot;clear: left&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/114690263431573304/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/06/10python.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/114690263431573304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/114690263431573304'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/06/10python.html' title='10日でおぼえるPython入門教室'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1123743929918981950.post-488382414869634638</id><published>2009-03-14T10:43:00.000+09:00</published><updated>2009-08-23T22:54:55.030+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FlipClip"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenPNE"/><title type='text'>OpenPNE　flipclip小窓スクリプト　新URL対応版</title><content type='html'>FlipClpリニューアルに伴って、クリップのURLを下記のように変更しました。&lt;br/&gt;&lt;br/&gt;旧URL&lt;br/&gt;&gt;&lt;pre&gt;&lt;br/&gt;http://www.flipclpi.net/{userid}/{clip_no}&lt;br/&gt;&lt;/pre&gt;&lt;&lt;br/&gt;&lt;br/&gt;新URL&lt;br/&gt;&gt;&lt;pre&gt;&lt;br/&gt;http://www.flipclpi.net/{clip_no}&lt;br/&gt;&lt;/pre&gt;&lt;&lt;br/&gt;&lt;br/&gt;旧URLから新URLへはリダイレクトするようにしているので旧URLはそのままにしておいて問題ないのですが、クリップのURLを正規表現でマッチさせてごにょごにょしたりしている場合、新URLだとマッチせずうまく動かないってことがおこっちゃってます。&lt;br/&gt;&lt;br/&gt;OpenPNEの小窓機能もそのひとつで、新URLを貼り付けるとうまくURLがマッチせず、動画が表示されなくなってしまってます。&lt;br/&gt;OpenPNEの中の人が対応してくれると思いますが、取り急ぎ、新URLでも動くものをのっけておきます。&lt;br/&gt;以下のflipclip.net.js、www.flipclip.net.jsをダウンロードして、public_html/cmd/に上書きコピーすればOKです。&lt;br/&gt;&lt;br/&gt;&gt;&lt;pre&gt;&lt;br/&gt;OpenPNE　flipclip小窓スクリプト　新URL対応版&lt;br/&gt;&lt;a href=&quot;http://hori-uchi.com/misc/flipclip.net.js&quot;&gt;flipclip.net.js&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://hori-uchi.com/misc/www.flipclip.net.js&quot;&gt;www.flipclip.net.js&lt;/a&gt;&lt;br/&gt;&lt;/pre&gt;&lt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.hori-uchi.com/feeds/488382414869634638/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://blog.hori-uchi.com/2009/03/openpneflipclipurl.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/488382414869634638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1123743929918981950/posts/default/488382414869634638'/><link rel='alternate' type='text/html' href='http://blog.hori-uchi.com/2009/03/openpneflipclipurl.html' title='OpenPNE　flipclip小窓スクリプト　新URL対応版'/><author><name>horiuchi</name><uri>http://www.blogger.com/profile/10139525039076752147</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DbarOEmxbQY-7t88aTcPR3nblhP-SF7lDtHMhAVFfndFC1qMbIuh4YZUNV-tgeQKdf_yMT1F6N-5B-3sQQuqHs76DEkyV89t7flWoxg7e_ftUUPvrw7Y9kNM4z8QiIA/s220/horiuchi_bigger.jpg'/></author><thr:total>0</thr:total></entry></feed>