<?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-7605170327719994580</id><updated>2024-11-01T20:36:48.605+09:00</updated><category term="Linux"/><category term="PHP"/><category term="debian"/><category term="ruby"/><category term="blogger"/><category term="programming"/><category term="rails"/><category term="Javascript"/><category term="MessagePack"/><category term="OAuth"/><category term="gcc"/><category term="仮想化"/><category term="Solaris"/><category term="emacs"/><category term="git"/><category term="lifehack"/><category term="mac"/><category term="make"/><category term="mysql"/><category term="plugin"/><category term="templates"/><category term="unix"/><category term="zsh"/><category term="AMQP"/><category term="C++"/><category term="Firefox"/><category term="Jetpack"/><category term="NTP"/><category term="Protocol Buffers"/><category term="R"/><category term="RabbitMQ"/><category term="SMF"/><category term="boost"/><category term="c"/><category term="ddns"/><category term="extension"/><category term="favicon"/><category term="google"/><category term="hash"/><category term="haskell"/><category term="jQuery"/><category term="jStat"/><category term="jTemplates"/><category term="libev"/><category term="libevent"/><category term="memcached"/><category term="network"/><category term="pika"/><category term="python"/><category term="slab"/><category term="swap"/><category term="visualize"/><category term="zend"/><category term="ソースコード"/><category term="ベンチマーク"/><category term="メモリ"/><title type='text'>taksatouの日記</title><subtitle type='html'>for my convenience</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7030317581652351185</id><published>2011-11-06T23:36:00.000+09:00</published><updated>2011-11-06T23:36:17.458+09:00</updated><title type='text'>ブログ移転しました</title><summary type="text">http://mojavy.com/
</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7030317581652351185/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/11/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7030317581652351185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7030317581652351185'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/11/blog-post.html' title='ブログ移転しました'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-1293017961308078793</id><published>2011-07-21T02:41:00.001+09:00</published><updated>2011-07-21T02:42:08.770+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>tcpdumpの使い方メモ</title><summary type="text">すぐ忘れるので自分用メモ

例えばmysqlだと以下でselect文がみれる。
sudo /usr/sbin/tcpdump -l -i eth0 -A -n -s 0 dst port 3306 | grep SELECT
unix ドメインソケットにながしてるデータを見る方法がないかあとで調査</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/1293017961308078793/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/07/tcpdump.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1293017961308078793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1293017961308078793'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/07/tcpdump.html' title='tcpdumpの使い方メモ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-8067279237350887087</id><published>2011-06-25T20:04:00.002+09:00</published><updated>2011-06-25T20:05:32.682+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>railsのデフォルト起動ポートを変更する方法</title><summary type="text">なんか毎回調べてる気がするのでメモ

config/boot.rbに以下を追記する

require &#39;rails/commands/server&#39;
module Rails
  class Server
    def default_options
      super.merge({
                    :Port        =&gt; 4000,
                  })                     
    end                                  
  end                                    
end                                      
</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/8067279237350887087/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/06/rails.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/8067279237350887087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/8067279237350887087'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/06/rails.html' title='railsのデフォルト起動ポートを変更する方法'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-1195084940857939608</id><published>2011-06-04T21:56:00.004+09:00</published><updated>2011-06-26T23:18:18.234+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>gitで迷子になった(no branch)に復帰する方法</title><summary type="text">gitを使って開発しているときに、以前のコミットのハッシュを直接指定してブランチを切らずにcheckoutすると(no branch)という無名のブランチができます。
どうしてそんなことをするかというと、例えば、開発を進めてる途中で別のやり方を思いついて以前の状態からやり直したいけど、あんまり自信ないからbranch切って名前つけるのはめんどくさい、みたいなときとか。まあブランチきればすむ話ですが、とにかくno branchで作業しちゃうときもあるのです。そういうときに限ってうまく実装できて、no branchで作業していることを忘れてそのままcommitしてしまったりします。
で、なにげなくmasterに戻ってみるとさっきの作業内容が見えなくなって焦るわけです。そういうときはno branchでコミットしたときのハッシュ値を直接指定してやればno branchでの状態に戻れます。no </summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/1195084940857939608/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/06/gitno-branch.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1195084940857939608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1195084940857939608'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/06/gitno-branch.html' title='gitで迷子になった(no branch)に復帰する方法'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7211675311875569778</id><published>2011-05-29T13:59:00.003+09:00</published><updated>2011-06-04T22:14:11.081+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><title type='text'>c++のコンテナをストリームに出力するコードスニペット</title><summary type="text">どういうことがしたいかというと、for (vector&amp;lt;string&amp;gt;::iterator it = lis.begin(); it != lis.end(); ++it) {
  cout &amp;lt;&amp;lt; *it &amp;lt;&amp;lt; endl;
}のようなループをかくのが面倒なのでcout &amp;lt;&amp;lt; lis &amp;lt;&amp;lt; endl;のように書きたい。これをやるにはtemplateパラメータにtemplateをつかってoperator&amp;lt;&amp;lt;をオーバーロードしてやればまあまあ簡単にかける。
forward_iteratorを実装してるコンテナならなんでもいけるはず。ネストしててもOKテンプレートパラメータが3つのコンテナ用の定義でlessとgreaterに分けてるのは、コンパイラに型推論をうまくやってもらうため。(テンプレートパラメータだけではstring</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7211675311875569778/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/05/c_29.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7211675311875569778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7211675311875569778'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/05/c_29.html' title='c++のコンテナをストリームに出力するコードスニペット'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-239281271917083984</id><published>2011-04-29T02:37:00.002+09:00</published><updated>2011-04-29T02:40:34.399+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>ruby開発環境構築メモ - xmpfilterを使ってrubyスクリプトに注釈をつける</title><summary type="text">


rcodetoolsを入れて快適なemacs生活をエンジョイしたい。
sudo gem install rcodetools

rcodetoolsをいれるとxmpfilterというコマンドにrubyスクリプトを食わせると、コメントで注釈をつけてくれる
これをemacsで使うためのelispがパッケージにはいってるので、それをload-pathの通っているところにコピーする。
.emacs.d/tmpがないと実行時にエラーがでたので、mkdirしておく
cp /usr/lib/ruby/gems/1.8/gems/rcodetools-0.*/*.el  ~/.emacs.d/elisp/
cp /usr/lib/ruby/gems/1.8/gems/rcodetools-0.*/*.elc  ~/.emacs.d/elisp/
mkdir ~/.emacs.d/tmp

.</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/239281271917083984/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/04/xmpfilterruby.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/239281271917083984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/239281271917083984'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/04/xmpfilterruby.html' title='ruby開発環境構築メモ - xmpfilterを使ってrubyスクリプトに注釈をつける'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-6641191948866021160</id><published>2011-04-23T15:11:00.004+09:00</published><updated>2011-04-23T15:17:16.710+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><title type='text'>rails3でrinariからmysqlにつなぐメモ</title><summary type="text">
rails3でmysqlを使おうとすると、gem mysql2 を要求された。
なので、config/database.ymlには以下みたいになるが、rinari-sql は &amp;quot;sql-&amp;lt;adapter名&amp;gt;&amp;quot; という名前の関数を探しにいくので、emacs側でsql-mysql2がないというエラーになる。
development:
  adapter: mysql2
  database: foo
  host: localhost
  port: 3306
  username: bar
  password: baz
  encoding: utf8
  pool: 5
  timeout: 5000

これを避けるには、以下のようにしてsql-mysql2にaliasをはるelispをかけばOK
(defalias &#39;sql-mysql2 &#39;</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/6641191948866021160/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/04/rails3rinarimysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6641191948866021160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6641191948866021160'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/04/rails3rinarimysql.html' title='rails3でrinariからmysqlにつなぐメモ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7593331634890308282</id><published>2011-04-08T23:27:00.006+09:00</published><updated>2011-04-09T00:42:46.478+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="haskell"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>haskellのリスト内包表記で格子点列挙</title><summary type="text">haskellのリスト内包表記について勉強してるときにたまたまこの記事を見つけたので試しにやってみた。
http://d.hatena.ne.jp/odz/20070131/1170284561


main = mapM print (mesh [[1..10],[1..10],[1..10]])

mesh [] = [[]]
mesh (x:xs) = [ x&#39;:xs&#39; | x&#39; &amp;lt;- x, xs&#39; &amp;lt;- (mesh xs) ]

パフォーマンスは調べてません。
もっといいやり方はありそうだけど、そこそこ直感的。。かな?
リスト内包表記って気持ち的にはSQL書くのに近い気がする。
</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7593331634890308282/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/04/haskell.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7593331634890308282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7593331634890308282'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/04/haskell.html' title='haskellのリスト内包表記で格子点列挙'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-6379020064925542319</id><published>2011-03-27T01:40:00.002+09:00</published><updated>2011-03-27T01:42:54.394+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>ruby環境構築メモ - fastri編</title><summary type="text">いまさらだけど、そろそろまじめにrubyの開発環境を整えようと思ったのでとりあえずfastriを導入した。
5分でおわると思いきや地味に苦労したので作業履歴メモ
http://eigenclass.org/hiki/fastri




手順
最新版のソースをおとす

展開してsetup.rbを実行

&#39;fastri-server -b&#39; でインデックス作成

&#39;fastri-server -B&#39; でフルテキストのインデックス作成

&#39;fastri-server&#39; で起動

qri Array みたいなかんじで使う


ところがqriを使おうとすると以下のようなエラーが。。
/usr/lib/ruby/1.8/rdoc/ri/ri_paths.rb:61: uninitialized constant Gem::Version (NameError)
from /usr/lib/ruby</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/6379020064925542319/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/ruby-fastri.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6379020064925542319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6379020064925542319'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/ruby-fastri.html' title='ruby環境構築メモ - fastri編'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-3400726939238714261</id><published>2011-03-22T23:22:00.002+09:00</published><updated>2011-03-23T01:06:00.011+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OAuth"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>twitterやfacebookのOAuthをつかってrails+omniauthでログイン機能を実装するメモ その２</title><summary type="text">前回(http://taksatou.blogspot.com/2011/03/twitterfacebookrails.html) 、OAuthで認証するところまでできたので、今回はtwitterアカウントでログインするところを作ります。omniauthのrailsチュートリアルビデオのpart2に大体対応してますが、ここでの内容はちょっと変えてます。
- http://railscasts.com/episodes/236-omniauth-part-2Contentsrails generate
modelauthenrication.rb
user.rb

controller
view
routes.rb
確認
まとめ
rails generate以下のようにしてdeviseのセットアップとmigrationをします。
emailとpasswordはつかわないので消します。</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/3400726939238714261/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/twitterfacebookoauthrailsomniauth.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/3400726939238714261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/3400726939238714261'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/twitterfacebookoauthrailsomniauth.html' title='twitterやfacebookのOAuthをつかってrails+omniauthでログイン機能を実装するメモ その２'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-5103545352670872867</id><published>2011-03-22T00:06:00.017+09:00</published><updated>2011-03-23T01:07:15.519+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OAuth"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>twitterやfacebookのOAuthをつかってrails+omniauthでログイン機能を実装するメモ その１</title><summary type="text">OAuthをつかっていろんなサービスと連動したアプリケーションがつくりたくなったので調査。
railsでやるにはoauth_pluginとかwarden_oauthとか色々なプラグインがあるみたいだけど、omniauthがよさそうです。
rails初心者なので基本的にはomniauthのチュートリアルビデオに沿って作業します。
- https://github.com/intridea/omniauth
- http://railscasts.com/episodes/235-omniauth-part-1自前でパスワードやメールアドレスは保持せずに、twitterやfacebookのアカウントを使ってログインできるようにするのが目標です。
ちなみにtwitter anywhereを使えば似たようなことはできそうですが、twitterに依存してしまうので今回はパス。Contents</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/5103545352670872867/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/twitterfacebookrails.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/5103545352670872867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/5103545352670872867'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/twitterfacebookrails.html' title='twitterやfacebookのOAuthをつかってrails+omniauthでログイン機能を実装するメモ その１'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-5463402502646112587</id><published>2011-03-21T15:01:00.001+09:00</published><updated>2011-03-21T15:02:13.928+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>githubでPermission denied (publickey)</title><summary type="text">自分のgithubリポジトリに複数のホストからpushする方法についてメモ% git push git&amp;#64;github.com:taksatou/config.git master
とかやってPermission denied (publickey).
fatal: The remote end hung up unexpectedly
なってしまう場合は公開鍵が登録されていないhttps://github.com/account
のSSH Public Keys からpushしたいホストの公開鍵を登録すればOK</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/5463402502646112587/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/githubpermission-denied-publickey.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/5463402502646112587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/5463402502646112587'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/githubpermission-denied-publickey.html' title='githubでPermission denied (publickey)'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7775568990246844049</id><published>2011-03-19T14:01:00.007+09:00</published><updated>2011-03-23T00:57:20.554+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jStat"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="visualize"/><title type='text'>Javascriptの統計ライブラリ jStatについて</title><summary type="text">jStat (http://www.jstat.org/) とはJavascriptでMATLABやRのような処理をするためのライブラリです。
(同名のjvm統計データ監視ツールとは関係ないです)

http://www.readwriteweb.com/hack/2011/03/jstat-its-like-r-for-javascript.php
でも紹介されてます。
R開発者のEd Borasky氏によると、これからはJavascriptでビジュアライズするのがトレンドらしいです。というわけでちょっと遊んでみました。準備jStatは以下のものに依存してるけど、http://www.jstat.org/download から依存ライブラリをまとめてパッケージにしたものがダウンロードできるので特になにもしなくてOK。jQuery - version 1.4.4+ (http://</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7775568990246844049/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/javascript-jstat.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7775568990246844049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7775568990246844049'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/javascript-jstat.html' title='Javascriptの統計ライブラリ jStatについて'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-6243099614960237962</id><published>2011-03-16T23:12:00.002+09:00</published><updated>2011-03-16T23:20:41.325+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lifehack"/><category scheme="http://www.blogger.com/atom/ns#" term="unix"/><title type='text'>tmuxの複数セッション間でバッファを共有する方法</title><summary type="text">マルチモニタで開発してる場合、それぞれのモニタ毎に端末アプリをたちあげることになりますが、端末ウィンドウ間でコピペをしたいときにマウスを使用せざるをえなくなってめんどうです。
emacsをサーバモードで起動すれば大抵の場合は事足りるのですが、いつもemacsだけで完結できるとは限りません。
というわけでtmuxとかscreenをつかってコピペするわけですが、tmuxのセッションをまたいでバッファを共有する方法をしらなかったのでメモ。manをみたところ、セッションをまたいでバッファをやりとりするのに以下コマンドが使えそうです。copy-buffer [-a src-index] [-b dst-index] [-s src-session] [-t dst-session]
(alias: copyb)
             Copy a session paste buffer to</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/6243099614960237962/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/tmux.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6243099614960237962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/6243099614960237962'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/tmux.html' title='tmuxの複数セッション間でバッファを共有する方法'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-876770413906580812</id><published>2011-03-13T18:45:00.006+09:00</published><updated>2011-03-14T22:22:01.078+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>Cのプリプロセッサーについてのtips集</title><summary type="text">Contentsプリプロセッサ処理のみを行う(gccの場合)
マクロの引数について
#ifdefと definedの違い
その他
pragmaとかpredefinedなマクロ

プリプロセッサ処理のみを行う(gccの場合)gcc -E a.cマクロの引数についてピリオド3つで可変長引数, __VA_ARGS__でその部分を展開
引数の頭に#をつけると文字列表記(ダブルコーテーションでくくられる)
引数の頭に##をつけると連結
#include &amp;lt;stdio.h&amp;gt; 
#define MY_PRINTF(...) fprintf(stderr, __VA_ARGS__)    
#define DEF(x, y) struct x##_##y##_t { static void f() { MY_PRINTF(&quot;%s, %s\n&quot;, #x, #y); } }  

DEF(foo</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/876770413906580812/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2011/03/ctips.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/876770413906580812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/876770413906580812'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2011/03/ctips.html' title='Cのプリプロセッサーについてのtips集'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7005581503251626031</id><published>2010-11-25T01:38:00.001+09:00</published><updated>2010-11-25T01:39:16.373+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><title type='text'>MacBook Air 環境構築まとめ 追記</title><summary type="text">virtualboxの仮想環境についてちょっと設定が必要だったのでメモ


http://taksatou.blogspot.com/2010/11/macbook-air.html


仮想環境に対してSSH接続するにはvertualboxの設定からネットワークアダプタにブリッジアダプタを追加する必要がある。
そうしないと、ホスト側とアダプタを共有してしまうらしく、ゲストOS側にIPが割りあてられないみたい




ゲストOS側はubuntuがうまくやってくれるみたいでなにもしなくてOK

：：</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7005581503251626031/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/11/macbook-air_25.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7005581503251626031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7005581503251626031'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/11/macbook-air_25.html' title='MacBook Air 環境構築まとめ 追記'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7NRup3ci7ebIKTSupLerSnNeHzBa_DjzwvkxHXRyHlREOsQysI0BapS9RSO6a08vv5Pjv-9GIkoQ_1adF28JcX64v9kK3UzZElSkPifXPCrTB8ZX6LRn1xSUEubgTCn_TBMxKcJlLLQE/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588%25EF%25BC%25882010-11-25+1.36.39%25EF%25BC%2589.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7042585228568632283</id><published>2010-11-24T02:35:00.004+09:00</published><updated>2010-11-24T22:43:10.807+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>MacBook Air 環境構築まとめ</title><summary type="text">MacBook Airを購入したら環境をさらすのが流行ってるみたいなので便乗です。
macは完全に初心者なのでいろんな所を参考にしつつとりあえずいれてみた。


- Xcode  http://developer.apple.com/technologies/tools/xcode.html
開発者ならとりあえずいれておくらしい。

- iTerm http://iterm.sourceforge.net/
標準で付属しているTerminalだと256色が変だったのでこっちをつかうことにした。

- virtualbox  http://www.virtualbox.org/
- ubuntu  http://www.ubuntulinux.jp/products/JA-Localized/virtualbox
手元の環境は汚さずに仮想環境で開発するのがモダン。
VirtualBox用の</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7042585228568632283/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/11/macbook-air.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7042585228568632283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7042585228568632283'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/11/macbook-air.html' title='MacBook Air 環境構築まとめ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7899781223746319653</id><published>2010-10-20T00:16:00.005+09:00</published><updated>2010-10-20T00:53:29.990+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="make"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="unix"/><title type='text'>makeでちょっと便利なメタプログラミング</title><summary type="text">GNU Make 第3版を見てたら、マクロとevalを使ってちょっと便利でおもしろいことができることに気づいた。

とりあえず例を書くとこんな感じ。
rules = foo bar baz

define def-rule
$1:
 @echo $1
endef

$(foreach i, $(rules), $(eval $(call def-rule, $i)))

マクロとevalを使えば動的にルールを生成できるのだ。
これだけでfoo bar bazの三つのルールがつかえるようになる。
便利！

これを使えばサブコマンドを受け付けるコマンドを使うルールを定義したい時とか、複数のディレクトリに対して処理を行いたい時に妥協したシェルスクリプトを書く割合が減る気がする。

ただし、マクロの中は二重に評価されてしまうので、makeの自動変数やfor文、シェル変数を使いたい時は＄の個数に</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7899781223746319653/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/10/make.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7899781223746319653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7899781223746319653'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/10/make.html' title='makeでちょっと便利なメタプログラミング'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-4749668094946002527</id><published>2010-07-04T23:22:00.002+09:00</published><updated>2010-07-04T23:23:59.457+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><title type='text'>debian 64bitで32bitバイナリをビルドするメモ</title><summary type="text">64bit　debianのgccでCプログラムをビルドするとデフォルトで64bitになる。

gccで32bitバイナリを作りたい時はgcc-multilib(C++の場合は、g++-multilib） を入れる

% sudo apt-get install gcc-4.1-multilib 
として

% cc -m32 example.c
でOK

% objdump -p a.out | grep format
a.out:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file format elf32-i386http://blog.gnu-designs.com/fix-for-incompatible-libstdc-error-message</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/4749668094946002527/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/07/debian-64bit32bit.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/4749668094946002527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/4749668094946002527'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/07/debian-64bit32bit.html' title='debian 64bitで32bitバイナリをビルドするメモ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7759223840512071655</id><published>2010-06-27T23:00:00.004+09:00</published><updated>2010-06-27T23:00:02.848+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ddns"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><title type='text'>ddclientメモ</title><summary type="text">以前から使っていたDiCEではここ最近になってなぜかIPの更新ができなくなってしまったので、DynDNS.comの説明を参考にしてddclientを導入した。

ダイナミックDNSサービスはDynDNSを利用
https://www.dyndns.com/

IPアドレス更新クライアントについて
https://www.dyndns.com/support/clients/

Linux / UNIX Update Clients
https://www.dyndns.com/support/clients/unix.html


上側に書いてあったのでddclientを採用。
主要なOSのバイナリは配布されている。
debianなら導入はapt-getでも可。


DynDNSを使っていれば設定ファイルは以下から自動で生成できる
https://www.dyndns.com/</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7759223840512071655/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/06/ddclient.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7759223840512071655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7759223840512071655'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/06/ddclient.html' title='ddclientメモ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7941338198730716011</id><published>2010-06-27T08:44:00.001+09:00</published><updated>2010-06-27T08:49:11.088+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="boost"/><category scheme="http://www.blogger.com/atom/ns#" term="hash"/><category scheme="http://www.blogger.com/atom/ns#" term="memcached"/><title type='text'>libmemcachedについてるlibhashkitであそぶ</title><summary type="text">libmemcachedにlibhashkitなんていう便利そうなライブラリがついていたので、各種ハッシュアルゴリズムの特性を調べてみた。
http://libmemcached.org/libMemcached.html

libhashkitでつかえるアルゴリズムは以下の通り。(libhashkit/types.h参照)
それぞれのアルゴリズムの説明は検索すればでてくるので省略。
HASHKIT_HASH_MD5,
HASHKIT_HASH_CRC,
HASHKIT_HASH_FNV1_64,
HASHKIT_HASH_FNV1A_64,
HASHKIT_HASH_FNV1_32,
HASHKIT_HASH_FNV1A_32,
HASHKIT_HASH_HSIEH,
HASHKIT_HASH_MURMUR,
HASHKIT_HASH_JENKINS,


テスト方法は、互いに異なる</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7941338198730716011/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/06/libmemcachedlibhashkit.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7941338198730716011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7941338198730716011'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/06/libmemcachedlibhashkit.html' title='libmemcachedについてるlibhashkitであそぶ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-4930363876704204496</id><published>2010-06-23T02:12:00.004+09:00</published><updated>2010-06-24T02:43:10.456+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>GoogleCLをdebianで試す</title><summary type="text">ちょっと便利そうなものがでてたので試してみました。

http://japan.cnet.com/news/service/story/0,3800104747,20415466,00.htm
http://code.google.com/p/googlecl/


まずプロジェクトページからダウンロード～普通にインストール

wget http://googlecl.googlecode.com/files/googlecl-0.9.7.tar.gz
tar xzf googlecl-0.9.7.tar.gz
cd googlecl-0.9.7
sudo python setup.py install


gdataが必要らしいので同様にインストール
http://code.google.com/p/gdata-python-client/


wget http://</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/4930363876704204496/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/06/googlecldebian.html#comment-form' title='3 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/4930363876704204496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/4930363876704204496'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/06/googlecldebian.html' title='GoogleCLをdebianで試す'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-7065906947231869527</id><published>2010-06-21T01:33:00.004+09:00</published><updated>2010-06-21T01:56:46.549+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="templates"/><title type='text'>bloggerのテンプレートの出し分けをする方法のメモ</title><summary type="text">bloggerのトップページと個別の記事ページでテンプレートの出し分けをしたくなったのでやり方をメモ。


&amp;lt;b:if cond=&#39;data:blog.pageType == &amp;quot;item&amp;quot;&#39;&amp;gt;
foo
&amp;lt;/b:if&amp;gt;

これでfooの部分が個別記事のなかでのみ有効になる

</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/7065906947231869527/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/06/blogger.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7065906947231869527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/7065906947231869527'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/06/blogger.html' title='bloggerのテンプレートの出し分けをする方法のメモ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-2098067199942386336</id><published>2010-06-05T15:18:00.002+09:00</published><updated>2010-06-05T16:19:07.391+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AMQP"/><category scheme="http://www.blogger.com/atom/ns#" term="pika"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="RabbitMQ"/><title type='text'>AMQP関連の参考リンクまとめ</title><summary type="text">最近RabbitMQをよくいじっているので、参考にした記事などをまとめておきます。


RabbitMQとはerlangで実装されたAMQPの一つです。
http://www.rabbitmq.com/

概要をつかむには以下のスライドが参考になります。サンプルコードものってます。
http://www.slideshare.net/hungryblank/rabbitmq-with-python-and-ruby-rupy-2009

英語ですがこちらのブログ記事はチュートリアル的に書かれていてとても参考になりました
http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/

下記のブログでもRabbitMQ関連の記事がよくポストされてます。
http://somic.org/category/rabbitmq/

greeの</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/2098067199942386336/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/06/amqp.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/2098067199942386336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/2098067199942386336'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/06/amqp.html' title='AMQP関連の参考リンクまとめ'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7605170327719994580.post-1563072514274558004</id><published>2010-04-18T16:53:00.005+09:00</published><updated>2010-04-18T16:56:13.582+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="NTP"/><title type='text'>debianの時計を合わせる</title><summary type="text">普通はOSをインストールした時にちゃんと設定されはずですが、どういう訳かシステムの時計がずれてきていたので設定方法をメモ。

時計を合わせるにはntpdateというパッケージを使います。
debianではntpdate-debianというコマンドが使えます。

$ sudo apt-get install ntpdate
$ sudo ntpdate-debian
これでNTPサーバに問い合わせて時計を合わせてくれます。
/etc/default/ntpdateファイルを編集すればNTPサーバを変更できます。

ついでにcrontabの設定もしておきます。

$ sudo crontab -e
0 0 1 * * ntpdate-debian
&amp;nbsp;　</summary><link rel='replies' type='application/atom+xml' href='http://taksatou.blogspot.com/feeds/1563072514274558004/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://taksatou.blogspot.com/2010/04/debian.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1563072514274558004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7605170327719994580/posts/default/1563072514274558004'/><link rel='alternate' type='text/html' href='http://taksatou.blogspot.com/2010/04/debian.html' title='debianの時計を合わせる'/><author><name>taksatou</name><uri>http://www.blogger.com/profile/06653965188181943367</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/AVvXsEjlcznfiRoVhb-xLuzYfsssi6dMSvGJodM9nT43F2WQFMR2sGjK2bgXrAUCMLLlJNi-iHKVq_Z0-dyYMZ28LNqVHpUS_YXa7_oruFD5WSuimLtM8_kuJr1Jky-s3YN9rA/s1600-r/c20090707_katamari_01_cs1w1_300x.jpg'/></author><thr:total>0</thr:total></entry></feed>