OSMC kodi

  # Install Nanum Font sudo apt-get install fonts-nanum # Download Noto-CJK TTF Font Free font Noto Sans CJK in TTF sudo cp /usr/share/fonts/truetype/nanum/NanumGothic.ttf /usr/share/kodi/media/Fonts/ sudo cp /usr/share/fonts/truetype/nanum/NanumGothic.ttf /usr/share/kodi/addons/skin.osmc/fonts/ sudo cp ~osmc/NotoSansCJKtc-Thin.ttf /usr/share/kodi/media/Fonts/ sudo cp ~osmc/NotoSansCJKtc-Thin.ttf /usr/share/kodi/addons/skin.osmc/fonts/ sudo cp /usr/share/kodi/addons/skin.osmc/16×9/Font.xml /usr/share/kodi/addons/skin.osmc/16×9/Font.xml.otg sudo vi /usr/share/kodi/addons/skin.osmc/16×9/Font.xml :%s/SourceSansPro-Regular.ttf/NotoSansCJKtc-Thin.ttf/g :%s/NotoSans-Regular.ttf/NotoSansCJKtc-Thin.ttf/g :%s/LiberationMono-Regular.ttf/NotoSansCJKtc-Thin.ttf/g :%s/Arial.ttf/NotoSansCJKtc-Thin.ttf/g :%s/OpenSans-Regular.ttf/NotoSansCJKtc-Thin.ttf/g :%s/Roboto-Light.ttf/NotoSansCJKtc-Thin.ttf/g :%s/Roboto-Thin.ttf/NotoSansCJKtc-Thin.ttf/g :%s/Roboto-Bold.ttf/NanumGothicBold.ttf/g :%s/NotoSans-Bold.ttf/NanumGothicBold.ttf/g :%s/NanumGothicBold.ttf/NotoSansCJKtc-Black.ttf/g  sudo apt-get install ibus-hangul   다음 스크래퍼 및 자막 다운로더 설정 애드온 다운로드 https://xbmc-korea-addons.googlecode.com/

osmc에서 애드온 설치 Movie, TV 컨텐트에 Daum Scraper 선택 GomTV 자막 애드온 선택   온도 측정

kodi 재시작/정지/시작


자체적으로 rotate되는 로그파일에 logrotate 적용하기

log rotate

tomcat 기본설정 처럼 로그파일 이름이 자체적으로 rotate되어 버리는 경우, logrotate 로의  통합이 어렵다. 네이밍은 자체룰을 이용하고 압축을 하는 등 후작업을 logrotate에 넣는 방식으로 통합하는 방법이다.


Apache 2.4 IP-ACL for ELB (also any other Proxy/LB)

Apache HTTPD

As you all know, we use the ‘X-Forwarded-For’ header to determine the IP of client when the HTTPD is behind the ELB (or other Proxy/LB). However it is very difficult to set the IP-ACL in Apache configuration files common to the cases with and without LB. (due to the Apache environment variables) So I have been operating under this settings for some services.

If you see “syntax error, unexpected $end”, just remove queotes of expressions. This is a bug of apache httpd.

Mysql General Procedures for DML using JSON data type

The new MySQL 5.7 version has some great features. One of them is the ‘JSON data’ type. We can use it for column of table like ‘Virtual Colunm’ with Indexing. But, ‘JSON data’ is also useful for stored procedure. Because we can compact parameters and the procedure could be more flexible.I made the procedures for table insert/update via JSON parameter. When I apply them to my project, data-handling codes in the application decreased dramatically. (These procedures impliment ‘MySQL Procedure Pattern for Nested Transaction‘)

AWS Solutions Architect Associate

AWS Solutions Architect Associate

I Passed the AWS Solutions Architect Associate Exam. The test is a quite difficult if you do not know exactly about the overall AWS. I’ll think about challenging professional qualifications the next step, if  this certification useful.

Mysql Backup Script


Features Full Backup (Mysqldump) Incremental Backup (Bin-log) Local Backup & Remote(AWS S3) Upload Sample Environments MySQL bin log prefix : mysql-bin BINLOG_PATH=/home/mysql/data BACKUP_ROOT=/home/backup/mysql S3_PATH=s3://system-backup/{SyatemName}/mysql


Subversion Repogitories Backup Script


Features Full Backup (Dump) Incremental Backup (Dump) Local Backup & Remote(AWS S3) Upload Sample Environments REPOS_ROOT=/home/svn/repos BACKUP_ROOT=/home/backup/svn S3_PATH=s3://svn-backup/svn



Don’t use utf8 encoding in MySQL (>= 5.5.3)


오늘날 한국어/중국어/일본어등 2바이트 문자권에서의 SW개발 및 다국어를 대비한 문자열 인코딩은 거의 UTF-8로 통일화 되고 있다. 그런데, MySQL의 문자인코딩 중 utf8인코딩은 ‘진짜 UTF-8’이 아니다 ! 원래 UTF-8은 규약상 한 문자가 4바이트까지 사용하는데 MySQL의 utf8인코딩은 3바이트까지만 입력이 가능하기 때문이다. 대부분의 한중일 문자는 3바이트 코드로  표현이 가능한데, 특히 특수문자나 한자를 많이 사용하는 일본어 등에서는 심심치 않게 4바이트 문자에 의한 문제가 나타난다. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ‥‥‥

When Nagios send alert mails with attachement…

When Nagios send alert mails with attachement… Perhaps this problem is that if a device name or warning message include non-Latin characters.   1. Add new command to nagios configuration Original commands

New commands

  2. Message filter script (PHP)

Actually I wanted to make a filter by Python. But it was less accurate than PHP to determine the encoding of the input string.

AWS CodeDeploy 설정 (S3)

AWS CodeDeploy

The flow of a typical AWS CodeDeploy deployment 설정 목록 EC2 On-Premises(EC2가 아닌 물리서버) CodeDeploy 서비스용 IAM 권한 생성 서버용  IAM 권한 생성 CodeDeploy Application 생성 EC2 설정 CodeDeploy Agent 설치/설정 On-Premise 서버 설정 배포 파일 준비, appspec.yml 설정 [반복] 배포 [반복] CodeDeploy 서비스용 IAM 권한 생성 [AWS-Console] IAM > Roles : Create New Role Role Type :  AWS CodeDeploy Attach Policy : AWSCodeDeployRole 서버용 IAM 권한 생성 [AWS-Console] IAM > Policies : Create Policy

[AWS-Console] IAM > Roles : Create New Role Role Type : AWS EC2 Attach Policy : 위 Policy를 선택 CodeDeploy Application ‥‥‥