2016年7月29日 星期五

After "Battle of Red Cliffs"

赤壁戰後,東吳軍攻曹仁,以及劉備軍南向的情勢圖。


REF: https://www.ptt.cc/bbs/Chan_Mou/M.1468849346.A.02A.html
https://www.ptt.cc/bbs/Chan_Mou/M.1468638200.A.8A9.html

ffmpeg basics

'ffmpeg basics' is the recommended book on ffmpeg.org official website.  should be pretty systematic introduction for new comers.

2016年7月27日 星期三

OS local repo

just found out that sometimes OS local repo is necessay, since commercial software which relies heavily on kernel & related dev tools, may be pretty sensitive to version changes. keep a local repo on hand would reduce the version update issue a lot. Take CentOS for example:

# rsync -avSHP --delete --exclude "local*" --exclude "isos" nearby.rsync.centos.net::CentOS/5.8/ /share/CentOS/5.8/

# rsync -vtr --progress --exclude debug/ rsync://mirror.pnl.gov/epel/7/x86_64/ epel

REF:
https://wiki.centos.org/zh-tw/HowTos/CreateLocalMirror
https://www.centos.org/forums/viewtopic.php?t=49977
https://www.centos.org/download/mirrors/
http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386

R import data

to load R script, set working dir, then read external csv.

source ("/mypath/myscript.R")
setwd ("/workdir")
my.data= read.table(...header=TRUE)

2016年7月25日 星期一

Check_MK RAW edition, part 9

Check_MK can utilize ssh to check. better not to use this...

The check_mk_agent needs to be run as root. This is not nice, but neccessary, since some of the information it gathers can only be read with root priviledges (for example some logfiles and network interface parameters).

REF: http://mathias-kettner.de/checkmk_datasource_programs.html

2016年7月24日 星期日

visualization for analytics

it's so scary that almost no book can be found for basic visualization for analytics, eg. Excel tips, in mainstream bookstore. most books talk about table processing and VERY simple functions only. This makes our country lack of detailed research ability for innovation, or to find out deep problems in systems.

ffmpeg vf filter for crop & scale

overlay, crop & scale with ffmpeg is soooo easy! sample as below.

ffmpeg -y -i $1 -vf "movie=$2 [info];[in][info] overlay=10:10:enable='between(t,02,04)' [overdone];[overdone] scale=1280x720 [out]" -movflags faststart -crf 18 -c:v libx264 -c:a copy -threads 0 -t 00:00:05 $source.overlay.mp4