Friday, April 30, 2010

ちっちゃいたこルカ

紙粘土が余っていたので、適当に作って着色。
サイズは縦横3cmくらい。

Wednesday, April 28, 2010

フリーactionscript開発環境

フリーでも問題なくflash開発はできるみたい。
参考サイトはこちら

FlexSDKはAdobeから。Flex4もあるけれど、3でいいかな。
IDEはFlashDevelop
jreを入れてない機体だったのでこれもダウンロード。

Flex3SDKを解凍して、とりあえずC直下に。
jreは普通にインストール。
FlashDevelopも特にいじらずデフォルトで。

こちらを見ながらインストール後の設定。

サンプルが無事にコンパイル&動作したので、一応設定終了。

さて、まずはactionscriptを覚えないと。
公式ドキュメントが豊富だから、参考書は当分要らないかな。

Tuesday, April 27, 2010

髪をカット

髪をカット。
目つきの悪さがいい感じ。


Monday, April 26, 2010

opencv2.0 & VisualStudio2008

VisualStudioでopencvを使う場合

追加のインクルードディレクトリ
C:\OpenCV2.0\include

追加のライブラリディレクトリ
C:\OpenCV2.0\lib

追加の依存ファイル
libcv200.dll.a libhighgui200.dll.a

これでいいのかな。一応コンパイルできるけど……

Sunday, April 25, 2010

podcast

とりあえず放り込んであるpodcast。
聞いてないのも多いし、ほとんどBGM代わり。

news:
http://abcnews.go.com/xmldata/xmlPodcast?id=1478958&src=i
http://downloads.bbc.co.uk/podcasts/worldservice/globalnews/rss.xml
http://rss.cnn.com/services/podcasting/cnnnewsroom/rss.xml
http://www.cnn.com/services/podcasting/newscast/rss.xml
http://rss.cnn.com/services/podcasting/studentnews/rss.xml
http://podcast.msnbc.com/audio/podcast/MSNBC-NN-NETCAST-M4V.xml
http://podcast.msnbc.com/audio/podcast/MSNBC-TDY-PODCAST-M4V.xml
http://downloads.bbc.co.uk/podcasts/radio/newspod/rss.xml
http://www.cbsnews.com/common/includes/podcast/podcast_eveningnews_video_1.rss
http://downloads.bbc.co.uk/podcasts/bbc7/wnc/rss.xml
http://media.worldvision.org/rss/wvus_podcast.xml
http://www.cbsradionewsfeed.com/rss.php?id=90&ud=512

study:
http://feeds.feedburner.com/EnglishAsASecondLanguagePodcast
http://learn-thai-podcast.com/feed/
http://feeds.feedburner.com/LearningIndonesian
http://downloads.bbc.co.uk/podcasts/worldservice/tae/rss.xml
http://survivalphrases.com/thai/feed
http://downloads.bbc.co.uk/podcasts/worldservice/how2/rss.xml

tech & etc...
http://feeds.feedburner.com/calismall
http://feeds2.feedburner.com/cmdln-enhanced
http://www.ibm.com/developerworks/podcast/channel-dwall.rss
http://feeds.conversationsnetwork.org/channel/itc
http://leo.am/podcasts/itn/
http://www.rocketboom.com/rss/quicktime.xml
http://www.scientificamerican.com/podcast/sciam_podcast_i.xml
http://se-radio.net/rss
http://www.uwtv.org/podcasts/eng_com_sci_m4v.xml
http://www.nasa.gov/rss/NASAcast_vodcast.rss
http://feeds.feedburner.com/boyt
http://www.anime4iphone.com/rss/
http://pepperstock.libsyn.com/rss
http://www.discovery.com/radio/xml/discovery_video.xml
http://pepperstock.libsyn.com/rss

Saturday, April 24, 2010

openssl

opensslで鍵を作る方法。

前回使ったmake-ssl-cert自体opensslのラッパのようなものみたいだけれど、一応opensslで鍵を作る方法も。
$sudo openssl req -new -x509 -newkey rsa:2048 -out /etc/ssl/certs/cacert.pem -keyout /etc/ssl/private/cakey.pem -days 365
RSAの2048ビット、期間1年で"/etc/ssl/certs/cacert.pem"に公開鍵、"/etc/ssl/private/cakey.pem"に秘密鍵を作るコマンド。
オレオレ認証ならホスト名だけ埋めとけば大丈夫。

秘密鍵からパスコードを抜くコマンドは、
$sudo openssl rsa -in /etc/ssl/private/cakey.pem -out /etc/ssl/private/cakey.pem

"/usr/share/ssl-cert/ssleay.cnf"を書き換えて、make-ssl-certを使うほうが無難かも。

Thursday, April 22, 2010

Apache + SSL

Apache2にSSLを設定する。

先日の記事の時点で、基本的なパッケージ導入は終わっているので、後はそれを有効にしていくだけ。

 まずはmod_sslの有効化。
$ sudo a2enmod ssl
 基本的にはSSLを有効化するだけで、自動的に443をListenしてくれるはず。

 鍵の作成もコマンド一発。これで作られる鍵は、RSA1024ビット、期間は約10年。
$ sudo mkdir /etc/apache2/ssl
$ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
 これで/etc/apache2/ssl/以下にapache.pem ともうひとつ(XXXXXXXX)ファイルが出来る。
 鍵の期間や強度を変更したい場合にはopensslコマンド参照。

 SSL用設定ファイルは環境に合わせて書き換える。
$ sudo pico /etc/apache2/sites-available/default-ssl

<中略>
NameVirtualHost *:443 ←追加
<VirtualHost *:443>

DocumentRoot "/var/www"
ServerName hogehoge.hoge
<中略>
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLCertificateKeyFile /etc/apache2/ssl/XXXXXXXX
 修正が終わったら、設定ファイルを有効にする。
$ sudo a2ensite default-ssl
 で、再起動。
$sudo /etc/init.d/apache2 reload
 これで自分認証だけどhttpsでアクセスできるようにはなる。

Wednesday, April 21, 2010

60cm

60センチ級習作途中経過。

Tuesday, April 20, 2010

apache2 + mysql + php5

初期設定は先日の記事通り。
まずはwebサーバとデータベース、ついでに色々言われることもあるけどPHPを突っ込んでおく。PHP楽だし。
$sudo apt-get install apache2
$sudo apt-get install mysql-server
$sudo apt-get install php5
$sudo apt-get install php5-mysql
apache2の再起動は
$sudo /etc/init.d/apache2 restart

"/var/www/"以下がデフォルトの公開ディレクトリなので
hoge.phpに
<?php phpinfo(); ?>
とだけ書き込んで、ブラウザからアクセスして動作確認。

Monday, April 19, 2010

手抜きコンソメスープ

コンソメスープがお手軽な理由。
・一度に大量に作れる
・火にかけたら後は放っておくだけ
・なべがあまり汚れない

材料
・水:カップ6
・コンソメ:キューブ4個
・たまねぎ:中2個
・肉(何でもいい):300~400
・野菜:じゃがいも中4個、にんじん1本、キャベツ1/4等、適当に何でも
・塩コショウ:味をみながら調整

野菜は少ないよりも多い方が美味しい。
キャベツは一見多く見えても、煮込むと嵩が減るので1/2くらい入れても平気かも。

手順
・なべに湯を沸かす
・たまねぎはみじん切り、他は一口大に切って、コンソメと一緒になべに放り込む。
・(好みに応じて塩コショウ少量加える)
・弱火で20~30分煮込む
・塩コショウで味を調える

おまけ
煮込む際にカットトマト一缶(400g)加えると、トマト煮込みになる。
さっぱりした味なので、初夏等にもお奨め。

アクがひどいようなら少し取るといいかも。

Sunday, April 18, 2010

Ubuntu Server初期設定

Ubuntu Serverを久しぶりにさわってみる。
とりあえずvmware playerにインストールしてみると……

かんいいんすとーる?
特に問題なさそうなのでそれで進める。

しばらく放置してインストール完了。
vmwareのネットワーク設定はブリッジモードにしておいた方がいい。

あれ、キーボードがUSになってる。
とりあえず
$sudo loadkeys jp
で日本語キーマップになるので、それで対処。
sshを突っ込んだあとは直接触ることもほとんどないので、起動ファイルを書き換えたりはしなくてもいいか。

タイムゾーンもおかしいので
$sudo cp /usr/share/zoneinfo/Japan /etc/localtime
$export TZ=JST-9
次はネットワーク。
サーバとして動かすなら静的アドレスじゃないと困るので
"/etc/network/interfaces"を書き換え。
auto eth0
iface eth0 inet dhcp
だとかなってるのを
auto eth0
iface eth0 inet static
address 192.168.1.X
netmask 255.255.255.0
gateway 192.168.1.X
としておく。

それからネームサーバの設定ファイル
"/etc/resolv.conf"も自分の環境に合わせて修正しておく。
nameserver 192.168.1.X
あとはパッケージのアップデートとsshのインストールで、初期設定は終了。
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install ssh
$ sudo apt-get install vsftpd
vsftpはおまけ。

Saturday, April 17, 2010

artoolkit on latest ubuntu9.10 (V4L2)

ARToolkit didn't support V4L2 webcam.
So, some good guy made patches for using V4L2 on artoolkit.
(Thank for http://techmemo.g.hatena.ne.jp/emergent/20080427/1209314478 and others.)

V4L2 patched artoolkit-2.72.1 is here.

Bbefore compile,
$ sudo ln -s /usr/src/linux-headers-2.6.xxxx/include/linux/linkage.h /usr/include/linux/linkage.h
$ sudo ln -s /usr/src/linux-headers-2.6.xxxx/include/linux/compiler.h /usr/include/linux/compiler.h
$ sudo ln -s /usr/src/linux-headers-2.6.xxxx/include/asm-generic/linkage.h /usr/include/asm/linkage.h
and...
$ ln -s /dev/video0 /dev/video
tested by ubuntu 9.10.

eclipse setting.


See also...



髪がぼさぼさ

さて、髪をカットして服を作ろうか。
ぼさぼさ髪もかわいいんだけどね。

Friday, April 16, 2010

トムヤンスープ

お手軽な本格的アジアンテイストなスープ。
一人暮らしの男性にお奨め。

・分量
水:カップ6
もやし:一袋
えび または 白身魚の切り身:適量(200g~300g)
粉末鶏がらスープ:大さじ2
トムヤンペースト:大さじ1.5
ねぎ:適量(人差し指の長さの2倍弱程度)
わさび:チューブ生わさびを人差し指の長さ程度

・手順
沸騰したお湯に鶏がらスープ、もやし、えび(切り身)を入れて数分煮る。
トムヤンペーストを加えて、弱火で15分程度煮込む。
刻んだネギとワサビを加えて一煮立ちさせる。
(煮込む時間を長くすると味がなじむので、それは好みで)

ナンプラーを小さじ2杯程度加えると、さらに本格的。
分量は好みに応じて微調整。

野菜はもやしの代わりに大根、にんじん、じゃがいも等も合う。
その場合煮込み時間を25分程度に。

Wednesday, April 14, 2010

ひとだんらく

貧乳娘はひと段落。
髪が落ち着いたらカットして、服を作らないと。