Archive for 2月, 2013

 

mac preview error:-108 memFullErr Ran out of memory [not enough room in heap zone]

2月 27th, 2013

https://discussions.apple.com/thread/3552945?start=0&tstart=0 -108 memFullErr Ran out of memory [not enough room in heap zone] だそうです。 メモリーを確認して、再起動しました。 macbook airはメモリー増設出来ないみたいですね 通常利用には全く問題有りませんが。

Read full article | コメントは受け付けていません。

nginx headerを書き換える

2月 24th, 2013

http://wiki.nginx.org/HttpHeadersMoreModule#more_set_headers * headers-more-nginx-moduleの最新版をダウンロードして https://github.com/agentzh/headers-more-nginx-module/tags 0.19をダウンロードして展開。 /path/to/headers-more-nginx-module-0.19 * インストール centos 6用のソースを利用するため http://nginx.org/packages/centos/6/SRPMS/nginx-1.2.7-1.el6.ngx.src.rpm をダウンロードしておきます。 # rpm -ivh nginx-1.2.7-1.el6.ngx.src.rpm 警告: nginx-release-centos-6-0.el6.ngx.src.rpm: ヘッダ V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY ########################################### [100%] specファイルを編集 # vim /root/rpmbuild/SPECS/nginx.spec オプション設定部分に –add-module=/path/to/headers-more-nginx-module を追加します。 %build ./configure \        –prefix=%{_sysconfdir}/nginx \        –sbin-path=%{_sbindir}/nginx \        –conf-path=%{_sysconfdir}/nginx/nginx.conf \     […]

Read full article | コメントは受け付けていません。

partition table range

2月 23rd, 2013

ERROR 1503 (HY000) at line 35: A PRIMARY KEY must include all columns in the table’s partitioning function プライマリーキーにpartitionキーが入っている必要がある。 CREATE TABLE IF NOT EXISTS `payment` ( `user_id` varchar(32) NOT NULL, `item_id` int NOT NULL, /* 略 */ `created_at` TIMESTAMP DEFAULT 0, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY(`user_id`,`aaa_code`) ) PARTITION BY RANGE (UNIX_TIMESTAMP(created_at)) […]

Read full article | コメントは受け付けていません。

鉄板カレー 匠えん

2月 14th, 2013

普通と言っていいでしょう。 日替わりランチ 630円 チキンカツカレーを食べました。 空いている時間に行ったので雰囲気は悪くないです。 ごはん:まぁまぁ、量もあります。 チキンカツ:目の前で揚げたて。 カレー:普通、一口目は美味しかったのですが、途中で飽きました。 総合:カツに合うカレーではないかな、机に調味料もないので、カツの味を味わいました・・・ サラダ:小皿のサラダが付くのは良いですね カウンターの前が調理場なので雑談は辞めた方が良いでしょう。 鉄板は紙を敷いて洗わなくて良いってのが目的かと思ったら店の名前に鉄板カレーと付いていた。 値段は悪くないと思います。 500-600円のカレーなので普通だと思います。

Read full article | コメントは受け付けていません。

nginx メンテナンスページへリダイレクト 405 Not Allowed. can not post to static page!

2月 13th, 2013

ページを返すパス(/action/)にアクセスしたら maintenance.html か ajaxパターンだったら .jsonを返す。 systemディレクトリはキャッシュしないように 0を指定。 messagepackを使っていたので、それようのヘッダーを返すように追加  location /action/ {    rewrite ^/actction/game/.*/\-/.*  /system/maintenance.msgpack last;    rewrite ^ /system/maintenance.html last;    return 404;  }  location ^~ /system {    root    /home/catwork.mixi/web;    expires 0;    types {      “application/x-msgpack;charset=x-user-defined” msgpack;      application/json json;    }    default_type text/html;  } と書いたのですが、POSTすると 404 […]

Read full article | コメントは受け付けていません。

050plus , fusion ip smart使ってみた!

2月 11th, 2013

050plusとfusion ip smartを使ってみました。 http://050plus.com nttコミュニケーションズのip電話 △携帯番号の登録が必要、同一番号、同一カードで5つ番号を持てるそうです。 ×月額315円(2ヶ月無料なので無料で試せます。 ・携帯通話 1分 16.8円 ◎固定通話 3分 8.3円 ・050番号選択可能 △呼び出し前に、「ゼロゴーゼロプラスへおつなぎします」のメッセージが入る。。。 ・留守番電話 ・国際電話アメリカ1分9円、中国1分29円 fusion ip smart http://www.fusioncom.co.jp/kojin/smart/ ◎月額無料 ・通話料 8.4円/30sec。 30秒単位なので、携帯向けは少し安い。 × 固定電話向けも8.4円/30sec同じなので ○ 携帯無しでも登録可能、sipフォンとしても利用可能 ・050番号選択不可(自動採番 ・アプリがサードパーティ(良くも悪くも)(chiffonはシンプルで広告が無いのでとりあえず入れてみた。 ・留守番電話(メールに添付転送可能)、転送 ・1年間課金が無い場合停止(規約上) ・国際電話 8円/30sec 自分は、仕事用に番号がひとつ欲しいで、fusion ip smartにしました。 050plusは呼び出し時のガイダンスが入るので利用出来ません。 (社内通話なら良いのですが、お客さんがかけたるときにこのメッセージはちょっと困りますね) fusion ip smartおすすめです。無料なので。 固定にたくさん掛ける方は 050plusですね。 ( 友達同士は無料通話アプリで十分だと思うので 実際使うと分かりません。着信が不安定、通話が不安定(音量)など問題はあるようなので、両方安いので使ってみてダメだったら辞めたら良いと思います。 こんな感じでした。 * イーモバイル pocket wifiは、050plus使えないそうです。 イーモバイルはポート制限ありとなしの接続設定(スマートフォンでは変更出来る)があるので、普通のスマートフォンの場合は今のところ使えています。

Read full article | コメントは受け付けていません。

subprocess check_output , check kyototycoon

2月 8th, 2013

http://docs.python.org/2/library/subprocess.html#replacing-older-functions-with-the-subprocess-module nagios用のスクリプト pythonからktremotemgrを呼んで状態を確認する 2.6なのでcheck_outputが使えなかった http://docs.python.org/2.6/library/subprocess.html#module-subprocess popenのところだけ from subprocess import Popen,PIPE # 略 p = Popen(["ktremotemgr","report","-host",options.hostname,"-port",str(options.port),"-tout","2"], stdout=PIPE)  output = p.communicate()[0]  if re.search(r’db_total_count’, output ):    m = re.search(r’db_total_count: ([0-9]*)’, output )    count = m.group(1)    m = re.search(r’db_total_size: ([0-9]*)’, output )    size = m.group(1)    print “OK: %s %s:%d count:%s size:%s” % (service, options.hostname, […]

Read full article | コメントは受け付けていません。

mysql-python mysqldb

2月 8th, 2013

http://mysql-python.sourceforge.net/ http://sourceforge.net/projects/mysql-python/ python 2.6 で 2.7は最新、3.xはこれからのようです。 インストール pip-python install MySQL-python Complete output from command python setup.py egg_info: [localhost] out:     The required version of distribute (>=0.6.28) is not available, こんなメッセージが出たので更新してから再度 easy_install -U distribute Successfully installed MySQL-python Cleaning up… === 参考:fabric に設定して fabric update_python_egg install_python_mysql -R all で10数台1回で更新出来ます。 参考:fabric + cuisineで管理 Fabric, Cuisine and Watchdog […]

Read full article | コメントは受け付けていません。

git tag 更新、削除

2月 6th, 2013

リモートにプッシュしたtagを更新、削除する。 更新 git tag -d testtag git tag -a testtag -m “update tag” git push origin testtag 削除 git tag -d testtag git push –delete origin testtag こんな感じ。

Read full article | コメントは受け付けていません。

fabric parallel modeでsudoを使うとき

2月 5th, 2013

Fatal error: Needed to prompt for a connection or sudo password, but input would be ambiguous in parallel mode パラレルモードだと、どっちのパスワードかわからなくなるよ。と オプションでパスワードを付ける fab production init_deploy -p pass

Read full article | コメントは受け付けていません。