docomoのデザリングとパケホーダイの料金

apple storeのアプリをベンチするためにGALAXY S II SC-02Cのデザリングで
ipodtouchを繋ごうと思い料金などを調べた時のメモ
(※2011年3月現在の情報なので情報が古い場合は再度お調べください。)


http://www.nttdocomo.co.jp/charge/packet/pake_hodai_f/notice/index.html

FOMA契約でテザリングをご利用時のパケット通信料金は、FOMAパケット定額サービス(パケ・ホーダイ フラットなど)
をご加入されている場合、「外部機器を接続した通信」の上限金額となります。
詳しくは各料金プラン・定額サービスの上限金額はパケット定額サービスで確認ください。


FOMAパケホーダイ・フラットの場合
最大5,460円(税抜5,200円)が「外部機器を接続した通信」になるので最大で8,190円(税抜7,800円)になるようです。
PCも繋ぐことを考えれば手軽に使えるネット環境を2500円くらいで使うか迷うところですね。


また、xiなどは現在割安のようですが、2012年10月からデータ量が7GBを超えた場合、
当月末まで通信速度が送受信時最大128kbpsになるそうなので、そっちも調べてみました。
現在の利用用途は仕事でmobageなどのベンチしているので、一日中通常のデータ通信を行なっていますが、
動画などはほとんどPCで見ているので大容量の通信は発生しません。


毎月の利用量は約10,000,000パケットくらいなので約1Gと考えると、
動画とかを頻繁に見なければ相当ヘビーに使っても7Gまではいかないですね。
(※1パケット=128byte)


キャリアのサイトは探したい情報見つけるのに一苦労しますね。

CentOSでvimを7.2系にUPDATE

[server@user]$ cd /usr/local/src
[server@user]$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2
[server@user]$ wget ftp://ftp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz
[server@user]$ wget ftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz
[server@user]$ tar jxvf vim-7.2.tar.bz2
[server@user]$ tar zxvf vim-7.2-extra.tar.gz
[server@user]$ tar zxvf vim-7.2-lang.tar.gz
[server@user]$ cd vim72


必要なパッチを当てます。※2012/03/14日現在は446個あるようです。

[server@user]$ mkdir patches
[server@user]$ cd patches
[server@user]$ wget ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.001-100.gz
[server@user]$ wget ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.101-200.gz
[server@user]$ wget ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.201-300.gz
[server@user]$ wget ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.301-400.gz
[server@user]$ gunzip 7.2.001-100.gz
[server@user]$ gunzip 7.2.101-200.gz
[server@user]$ gunzip 7.2.201-300.gz
[server@user]$ gunzip 7.2.301-400.gz
[server@user]$ curl -O 'ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.[401-446]'

[server@user]$ cd ..
[server@user]$ cat patches/7.2.* | patch -p0
[server@user]$ ./configure

エラーで止まった。

no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.


ncursesってライブラリが必要なようなのでインストール

[server@user]$ cd /usr/local/src
[server@user]$ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
[server@user]$ tar xvzf ncurses-5.9.tar.gz
[server@user]$ cd ncurses-5.9
[server@user]$ ./configure
[server@user]$ make
[server@user]$ make install


もう一度

[server@user]$ ./configure
[server@user]$ make
[server@user]$ make install

ついでに下記のようにしておくと便利かも

.bashrc

alias vim="vim -u ~/.vim_user"

2012-03-23 こちらの方が楽でした。

http://blog.ville.jp/2011/03/11/536

[server@user]$ yum install mercurial
[server@user]$ cd /usr/local/src
[server@user]$ hg clone https://vim.googlecode.com/hg/ vim
[server@user]$ cd vim
[server@user]$ ./configure --enable-multibyte --enable-xim --enable-fontset --disable-selinux --with-features=huge
make && make install

githubでwgetできなかったからcurl使った

[server@user]$ wget https://github.com/a9b/hoge/zipball/master

とやってみたらSSL関係のエラーが出たので調べてみると
githubの仕様がちょこちょこ変わっている模様です。

参考URL

http://d.hatena.ne.jp/tmatsuu/20110614/1308010044


wgetの最新版を入れるという選択肢もあるが、面倒なので
cURLで済むならcURLで済ます。

[server@user]$ curl -L -o hoge.zip https://github.com/a9b/hoge/zipball/master

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). The default
bundle is named curl-ca-bundle.crt; you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

中間証明がおかしいようなので、警告を無視してみる。

[server@user]$ curl -L -o hoge.zip https://github.com/a9b/hoge/zipball/master --insecure

無事取得できました。

swfmillのインストール

動的なモバイル向けコンテンツの作成に必須のswfmillのインストール方法です。

# 必要なモジュールの追加

yum install ImageMagick-devel
yum install t1lib*
yum install freetype*
yum install libjpeg*
yum install giflib-devel
yum install libpng*
yum install freetype-devel*
yum install libxml2*
yum install libpng*
yum install libxslt*


# swfmillのインストール

cd /usr/local/src
wget http://swfmill.org/releases/swfmill-0.2.12.tar.gz
tar xzfv swfmill-0.2.12.tar.gz
cd swfmill-0.2.12
wget http://lab.klab.org/files/flash/encoding.patch
patch -p1 < encoding.patch
./configure
make
make install


# swftoolのインストール

cd /usr/local/src
wget http://www.swftools.org/swftools-0.9.1.tar.gz
tar xzfv swftools-0.9.1.tar.gz
cd swftools-0.9.1
./configure
make
make install


# テスト

swfmill -e cp932 swf2xml /tmp/test.swf /tmp/test.xml


# 参考サイト

http://www.webdesignersblog.jp/archives/2010/07/09183445.php

mysqlが起動できない

マンションの停電でサーバーの再起動をしたらmysqlが起動していないようなので確認。

[user@sv mysql]#tail -20 /var/log/mysqld.log
110926 21:51:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110926 21:51:11 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
/usr/libexec/mysqld: Can't create/write to file '/tmp/******' (Errcode: 28)
110926 21:51:11 InnoDB: Error: unable to create temporary file; errno: 28
110926 21:51:11 [ERROR] Plugin 'InnoDB' init function returned error.
110926 21:51:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
110926 21:51:11 [ERROR] Can't start server : Bind on unix socket: No space left on device
110926 110926 21:51:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

権限系かと色々と試行錯誤。

参考にしたサイト

http://bird-memo.seesaa.net/article/18585618.html
http://blog.mizoshiri.com/archives/166

試したコマンド

mysql_install_db
chown -R mysql:mysql /var/lib/mysql
chmod 777 /tmp
rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1
/usr/bin/mysqld_safe --user=root --skip-grant-tables &

ん?そもそもtmpの下にファイルが書き込めない?
ディスク容量かー!
確認したら案の定100%だったのでディスクを整理して再起動。
見事起動しました。

小一時間悩みました。

chromeでvimp

chromefirefoxのvimpみたく動く良いものがないので、
一応下記で代用とコンフィグいじるとそれなりに動きます。
バッファの操作とかがいまいちですが。。。
早く完全にエミュレートしてくれないかなー。

Vimium - Options

https://chrome.google.com/webstore/detail/dbepggeogbaibhgnhhndojpepiihcmeb

map l nextTab
map h previousTab
map d removeTab
map u restoreTab
map gf toggleViewSource
map y copyCurrentUrl

### Sample Settings

# aliases
# in this example you can open extensions page by the command ':ext'
# and Chrome's option page by the command ':option'
alias ext TabOpenNew chrome://extensions/
alias option TabOpenNew chrome://settings/browser

# mappings for opening your favorite web page
nmap t :TabOpenNew http://www.twitter.com
nmap g :TabOpenNew http://www.google.com/
nmap m :TabOpenNew https://mail.google.com/mail/#inbox
nmap f :TabOpenNew http://ja-jp.facebook.com/
nmap r :TabOpenNew http://www.google.com/reader
nmap e :TabOpenNew https://www.evernote.com/
nmap c :TabOpenNew https://www.google.com/calendar/

# F for continuous f-Mode
# this is recomended setting but commented out by default.
# if you want to use this setting, use the following
#nmap F :GoFMode --newtab --continuous

# if you want to change the key used to escape EmergencyMode mode,
# use emap like the following
#emap :Escape

## pagecmd offers you page specific key mapping.
# in this example you can use , for moving between tabs
# on all web pages regardless of your ignored list setting
# because pagecmd has higher priority than ignored URLs.
#pagecmd * nmap :TabFocusNext
#pagecmd * nmap :TabFocusPrev
pagecmd * nmap l :TabFocusNext
pagecmd * nmap h :TabFocusPrev
nmap l :TabFocusNext
nmap h :TabFocusPrev

# almost all Vichrome functions don't work properly for pdf contents
# so it's useful to enable default key bindings for pdf file.
pagecmd *.pdf nmap

# if you want to use twitter web's key binding, write settings like below
#pagecmd http*://twitter.com/* nmap f
#pagecmd http*://twitter.com/* nmap r

namp :Escape
#nmap t :Tab
nmap b :TabList
nmap d :TabCloseCurrent

nmap T :OpenNewTab -i
nmap t :OpenNewTab -i g

gf : TabOpenNew --next view-source:%url
y : copyurl