Category: Howto

How to Encrypt Video for HLS

HLS only supports AES-128. The Advanced Encryption Standard (AES) is an example of a block cipher, which encrypts (and decrypts) data in fixed-size blocks. It’s a symmetric key algorithm, which means that the key that is used to encrypt data is

Use Digital Certificates issued by a Certification Authority (CA) with curl

I have a .cer (Digital Certificate) file, .pfx (Personal Information Exchange file i.e., the private key for the certificate). I cannot use either of these to authenticate to the web service as curl would not accept these formats.

Deal with Maven Error – Failure to Transfer

If you got any “Failure to Transfer” error.

Install latest version of git on CentOS 6.x/7.x

Installing a specific version of git say 2.x I found this nice and easy-to-follow guide on how to download the GIT source and compile it yourself (and install it). If the accepted answer does not give you the version you

SVN to Git migration

if you are experiencing following error while doing checkout by following “Migrate to Git from SVN“: fatal: Cannot setup tracking information; starting point ‘origin/???/*’ is not a branch. The reason of the error is during migration, your origin remote was

Android ADB command line for calls

some funny android console command (ensure you enabled your android device’s USB debugging mode before trying):

Drop All Tables in MySQL Database in one single command

Usually to to drop the database / schema and then re-create it is a quite easy way to delete all the tables. But this is applicable only if you have the permission to deal with the database / schema

Nginx FastCGI Example (with PHP FPM) – Path_Info & PHP_SELF

There are many guide about configuring nginx with PHP FPM, but many of them are incomplete (doesn’t handle PATH_INFO correctly) or contain security issues (doesn’t check whether the script is indeed php file).

Remove CNNIC ROOT certs from your system

CNNIC (China Internet Network Information Center) plays evil! Let’s get rid of it asap! 有些浏览器(IE、Chrome、Safari)使用的是操作系统的证书体系。这种情况下,你需要把 CNNIC 证书从操作系统的证书体系中去掉。还有些浏览器(比如Firefox、Opera)是自己带了一套证书体系。你只要在其配置界面,把不要的证书去除即可。下面分不同的浏览器,不同的操作系统,分别介绍。


Create /etc/profile.d/ file if it’s doesn’t exist, and add / change the content to (if you are using JDK from Oracle, you may need to adapt the path if you are using other JDK): export JAVA_HOME=/usr/java/default/