2012-05-01から1ヶ月間の記事一覧

不思議

use 5.14.2; use Data::Dumper; my %hoge = (aaa => 1 , bbb => 2); my %fuga = (ccc => 3 , ddd => 4); my @hoge = ( map{"HOGE::$_"}keys %hoge , map{"FUGA::$_"}keys %fuga, ); say Dumper @hoge; $VAR1 = 'HOGE::bbb'; $VAR2 = 'HOGE::aaa'; $VAR3 = 'H…

fluentd.conf

## built-in TCP input ## $ echo <json> | fluent-cat <tag> <source> type tail path /var/log/supervisor/plack/access.txt pos_file /tmp/pos.txt tag app_server format /^(?<unixtime>.+)\t(?<path>.+)\t(?<agent>.+)\t(?<input>.+)\t(?<output>.+)\t(?<method>.+)$/ </source> <match **> type mongo database proje…</match></tag></json>

fluentdを入れるだけで結構困った件

困ったので備忘録。まずzlib入れる。 wget http://zlib.net/zlib-1.2.7.tar.gz tar vxzf zlib-1.2.7.tar.gz ./configure ; make ; make install Ruby入れる wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz tar vxzf ruby-1.9.3-p194.tar…

androidのorg.jsonのバグについて

try{ HashMap<String , Object> outer = new HashMap<String , Object>(); HashMap<String , String> inner = new HashMap<String , String>(); inner.put("AAA", "BBB"); outer.put("aaa", inner); outer.put("bbb" , null); outer.put("ccc" , ""); JSONObject json = new JSONObject(outer); Log.d("TEST" , json.toStri…</string></string></string></string>

nginxでリバースプロクシするときのヘッダ

if (-f $request_filename) { break; } proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://127.0.0.1:3000;NGでした。正…