« July 2010 | Main | September 2010 »

August 2010

27 August 2010

PotD: Chōchin

Picture of the day:

Have you ever seen a chōchin? Yes, it's like lantern. This picture was taken in front of a restaurant.

18 August 2010

あのコマンドのソースがほしい

ifconfig のソースコードがほしかったので このサイト を参考にソースコードをゲットしまして、以下その辺りの作業ログ。

# yumdownloader が必要ってことでまずは yum-utils をインストール。
$ sudo yum install yum-utils
# 次に対象のコマンドのRPMを探す
$ rpm -qf /sbin/ifconfig
net-tools-1.60-81.el5
# ダウンロードする。
$ yumdownloader --source net-tools-1.60-82.fc7
# 一応、RPMの中身を確認
$ rpm -qpl net-tools-1.60-82.fc7.src.rpm
# ファイルを展開する
$ rpm2cpio net-tools-1.60-82.fc7.src.rpm | cpio -id
# 肝心のファイルを展開
$ tar xvf net-tools-1.60.tar.bz2
# 移動して、
$ cd net-tools-1.60
# ここを見たかったのよ。
$ vi lib/interface.c

seealso:

17 August 2010

PotD: BE@RBRICK

Picture of the day:

These BE@RBRICKs are free gifts by buying PEPSI by PEPSI x ZOZOTOWN campaign. I didn't think about collecting them though ;p

16 August 2010

PotD: Hot evening

Picture of the day:

Tokyo is very very hot. I felt that today is the hottest day in this summer. This photo taken a view of Tokyo-Midtown from our office.

13 August 2010

NetAddr::IP for IPv6

I'm looking for Perl module for parsing IPv6. I found NetAddr::IP on CPAN. It looks good for me. If you know other recommendations which you felt good, please let me know on comment form. Thanks in advance!

IPv6 を操作したいので Perl モジュールを探しています。NetAddr::IP は割と良さげでした。でももしオススメなモジュールをご存知でしたらコメント欄で教えてくださいね。

 

$ cpanm NetAddr::IP
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{FD00::1})->addr'
FD00:0:0:0:0:0:0:1
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{FD00::1})->short'
FD00::1
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{FD00::1})->full'
FD00:0000:0000:0000:0000:0000:0000:0001
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{FD00::1})->full6'
FD00:0000:0000:0000:0000:0000:0000:0001
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{FD00::1})->version'
6
$ perl -MNetAddr::IP -le 'print NetAddr::IP->new(q{128.0.0.1})->version'
4

Hmm, AnyEvent has a few methods for parsing IPv6, but these methods are embedded in AnyEvent::Socket.

AnyEvent なんかも見たんですが自前で IPv6 の実装が入っていましたわ。うーむ。


追記

ふむ。AnyEvent::Socket::parse_ipv6 では

sub parse_ipv6($) {
   # quick test to avoid longer processing
   my $n = $_[0] =~ y/://;
   return undef if $n < 2 || $n > 8;

という感じで簡単な IPv6 アドレスのチェックをしていますね。これの方式でも IPv6 のアドレスの確認用途としては足りる気もします。

10 August 2010

iBus didn't work under Python 2.5 on Ubuntu 10.04

I'm using Ubuntu 10.04, and ibut-anthy is for Japanese input. Anyway, I wanted to use Python 2.5 for Google App Engine. Then I installed Python 2.5. Yeah, I was be able to use GAE. But I didn't input Japanese. I tried to re-install iBus and related stuffs. But it didn't look good. Hmm, ah,okay, so when I installed Python 2.5, I remained bin/python. This python was 2.5. ;p I removed bin/python as 2.5. Then I used Python 2.6 as default. Then iBus was just recovered. Hehe, just my two cents.

私は Ubuntu 10.04 で ibus-anthy で日本語入力をしています。で、Google App Engine を使いたかったので Python 2.5 をインストールしたら日本語が使えなくなりました。iBus 関連を再インストールしたりしたんだけど改善しなくて。そしたら Python 2.5 をインストールしたときに python の実行ファイルを残したままでした。そこで Python 2.5 の python 実行ファイルを削除して、デフォルトを Python 2.6 にしました。そしたら日本語入力も復活しました。Python をマルチで動かす人は気をつけよう。

05 August 2010

はてなロゴTシャツ&ステッカー、ゲットー!

via d.hatena.ne.jp

I

via www.hatena.ne.jp

Yay! I got hatena T-shirts and sticker. Thank you!!!

seealso 「はてなロゴTシャツ&ステッカー欲しい!」キャンペーン当選発表 - はてなダイアリー日記

Access Ranking

Powered by Six Apart
Sponsored links