2014-01-01から1年間の記事一覧

Norikra meetupで話してきた

Norikra meetupで話してきました. 資料 Norikraでアプリログを集計してリアルタイムエラー通知 # Norikra meetup from kawamuray 感想 皆さんNorikraを使いこなしてた. 特に@ixixiさんの発表が凄かった.NorikaのLOOPBACK+UDA?Fで,データをパイプライン的…

lxc.mount.entryで指定したマウントは,ホストからは見えないんだよ

LXCは設定ファイルにlxc.mount.entryを書いておくと,起動時にマウントしてくれるわけですが,そのマウントはホストからは見えません.namespaceが別だから. ... lxc.mount.entry = /usr/lib usr/lib none bind,ro 0 0 ... 例えば,上記のような設定ファイ…

MBAのSDカードスロットを使ってRaspberryPI用のSDカードにGentooがインストールされたディスクイメージを書き込む方法

私のGentooマシンにはSDカードスロットがついてなくて,RaspberryPIのためだけに買ってくるのもなんなので,MBAについているSDカードスロットを使って書き込みを行おうと思った.しかしOSXの/sbin/fdiskはutil-linuxのそれとは全く使い方が違って使いたくな…

今年もGoogle Summer of Codeに採択された

Google Summer of Code2014(GSoC)に応募してたのが採択されました. OrganizationはGanetiで,Projectは"Improve LXC Support"です. https://www.google-melange.com/gsoc/project/details/google/gsoc2014/kawamuray/5673522948997120 今年はタイムテーブ…

FEATURES='distcc'っていうのがとても捗る

RaspberryPIにGentooを入れて遊び始めたが,emergeが遅すぎてつらい.まあcross compile前提だよねーと思って環境を作ってみたものの,/以下まるっとrsyncとかなんか怖いしqpkgとか使い方しらんし覚えたくねーなって思っていたところ,Portageがdistccをサポ…

Module absolute import in python

Python defaults to import module relatively. Here is description of python's module search order. Give example: $ mkdir -p /tmp/abs-import-test/{foo,bar} $ cd /tmp/abs-import-test $ touch {foo,bar}/__init__.py # make foo and bar as a pytho…

4byteのUTF-8文字を置換する

mysqlはCHARSET=utf8なVARCHAR型等のカラムでは3byteまでのUTF-8文字しか格納できず,4byte文字をINSERTしようとするとIncorrect string valueと言われてしまう.これはutf8mb4を指定することで回避できるが,最大長が255文字でかつインデックスを貼る必要が…

equery changes its output by isatty()

I've got confused when trying to see output of equery depgraph. It turns off verbose flag if its output piped to another process. When executing it without piping output, the output is formatted as tree-view and contains informations regar…

Skip emerging package which was provided manually

Use package.provided. For example, if you want install virt-install from portage without depending to app-emulation/libvirt: # /etc/portage/profile/package.provided app-emulation/libvirt

Gyazo2.0及びGifzoのLinux用クライアントを書いた

探したけどなさそうだったので. https://github.com/kawamuray/Gyazo2-Gifzo-Linux GyazoのLinux用クライアントは公式っぽいのがあるんですが,Gyazo2.0で対応したGIFとかのサポートがないし,そもそもメンテされてる感がない.ので,パッチ書いてp-rしても…

Norikraでログ集計してアプリのエラーを素早く検知しようという話

背景 webアプリを書いていると,以下のようなロギングコードを至る所にちりばめる事になると思います. $c->log(error => "Chou Yabai ERROR!"); ただいくらログを吐いても,アプリのログからは片時も目を話さないよ!!みたいな真面目なエンジニアじゃない…

If mounted cgroup blkio directory have files less than you were expected

You may need to set more kernel configuration parameters. The blkio subsystem can be appear if you set CONFIG_BLK_CGROUP to be yes even if you didn't set all required parameters in kernel configuration. You can find all needed configuratio…

Get focused window title(name) using X11::Protocol

Use GetInputFocus() to get current focused window and use GetProperty() to get name of window. use X11::Protocol; my $x11 = X11::Protocol->new; my ($focuswin) = $x11->GetInputFocus; my ($title) = $x11->GetProperty( $focuswin, $x11->atom('W…