Android 7.0 Nougat on my Galaxy Tab S

If you are an owner of Galaxy Tab S, I am quite sure you hate Samsung for not giving you update to Marshmallow. Fret not! I found this vanilla Android ROM on XDA.

It makes my Tab S fly. TouchWiz has slowed down my device. The difference is day and night. I suggest you to install this ROM if you are not afraid of rooting and flashing custom ROM. There are some minor issues like rotation graphic glitch but you can use this as a daily driver.

Saving a read-only file in VIM

Since I use Digital Ocean and Linode cloud VPS, I need to use VIM a lot when I need to update configuration files on server. And this happens to me a lot. Trying to save a read-only file after modifying lots of lines. It is a frustrating situation. Then I found this blog post http://www.geekyboy.com/archives/629. You can actually save a read-only file in VIM!

This is the command :w !sudo tee %

You may read detail explanation on how the command works here. http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work/7078429#7078429

 

 

How to increase PHP-FPM Idle Timeout

By default PHP-FPM sets the script execution (idle) timeout to 30 seconds. In some cases, 30 seconds is not enough. You can bump up the timeout by editing the file /etc/apache2/conf.d/php5-fpm and change this line:

FastCgiExternalServer /fcgi-bin-php5-fpm -socket /var/run/php5-fpm.sock -pass-header Authorization`

to this:

FastCgiExternalServer /fcgi-bin-php5-fpm -socket /var/run/php5-fpm.sock -idle-timeout 250 -pass-header Authorization

Reload PHP-FPM after modifying: /etc/init.d/php5-fpm

 

Apache with PHP-FPM and Event MPM

PHP has many handlers you can choose. Which one is the best? There are pros and cons of each handler and you can find them easily just by googling. It really depends on your application nature and server environment.

I use Digital Ocean one click app to install Joomla on the droplet. It is a LAMP (Linux, Apache, MySQL and PHP) setup and the default PHP handler is Apache PHP handler. I found out that php5-fpm performance is better than the default handler in my case.

Another changes I made was to use a specific Apache MPM (Multi Processing Module). The latest versions of Apache offer the Event MPM, which is the Apache’s only hope and fighting chance for good benchmarks against NGINX. The Ubuntu 14.04 LAMP image is configured with the oldest Prefork MPM, which is also the clumsiest and RAM hungriest of all Apache MPMs.

Continue reading

Hello World!

Hello World! I am James, a software engineer, who is currently working as an Digital Development Manager at Myanmar Marketing Research & Development Co. Ltd.

I am going to write about new technology I’m interested in, programming related stuff and other interesting things I stumbled online. My bookmark blog of technology related stuff! Welcome!