Shameer Chttp://blog.shameerc.comTech blog of Shameer CFri, 03 Mar 2017 00:00:00 +0000Quick Tip - Fixing Time drift issue on Docker for Machttp://blog.shameerc.comhttps://blog.shameerc.com/2017/03/quick-tip-fixing-time-drift-issue-on-docker-for-machttp://blog.shameerc.comhttps://blog.shameerc.com/2017/03/quick-tip-fixing-time-drift-issue-on-docker-for-mac<![CDATA[As we know, many of the Mac users don't shut down their laptops every day. When the work is done we simply close the lid and let the Mac sleep. But when the system wakes up, the time in every docker container will lag behind and starts from the time when the system went to sleep. This is not always ]]>Fri, 03 Mar 2017 00:00:00 +0000PHP 7.1 - 9 New Features you need to knowhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/11/php-71-8-new-features-you-need-to-knowhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/11/php-71-8-new-features-you-need-to-know<![CDATA[PHP 7.1, the new minor version of PHP is finally here, with a number of new features, changes, and bug fixes. In this article, let's look at some of the awesome features in PHP 7.1. Like, iterable pseudo type Closure from callable Square bracket syntax for list() Support for keys in list Class con]]>Sat, 26 Nov 2016 00:00:00 +0000My Docker Setup - Ubuntu, php7-fpm, Nginx and MariaDBhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/08/my-docker-setup-ubuntu-php7-fpm-nginx-and-mariadbhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/08/my-docker-setup-ubuntu-php7-fpm-nginx-and-mariadb<![CDATA[When we work as a team, it's insanely difficult for all of us to have the same environment. Some devs may be working on Linux machines whereas others working on Mac/Windows machines. Some dependencies may work on some machines, while others may not even support them. Then we also have this problem o]]>Fri, 26 Aug 2016 00:00:00 +0000Set up OAuth2 server using Laravel Passporthttp://blog.shameerc.comhttps://blog.shameerc.com/2016/08/set-up-oauth2-server-using-laravel-passporthttp://blog.shameerc.comhttps://blog.shameerc.com/2016/08/set-up-oauth2-server-using-laravel-passport<![CDATA[Laravel is one of my favorite frameworks, not because it is the best but it provides far better developer experience compared to any other frameworks. Laravel 5.3 comes with a handful of new features like Passport, Scout, Notifications, etc. that will make our life even easier. Passport is a Larave]]>Tue, 23 Aug 2016 00:00:00 +0000Knapsack - Collection Pipeline for Fun and Profit!http://blog.shameerc.comhttps://blog.shameerc.com/2016/07/knapsack-collection-pipeline-for-fun-and-profithttp://blog.shameerc.comhttps://blog.shameerc.com/2016/07/knapsack-collection-pipeline-for-fun-and-profit<![CDATA[PHP has this powerful data structure called array, which we can use to handle any collection of data. We can then traverse them using for or foreach and process the data. The introduction of Closures in PHP 5.3 made the collection processing a bit more interesting with functions like array_map, arra]]>Sun, 10 Jul 2016 00:00:00 +0000Export selected rows from MySQL tablehttp://blog.shameerc.comhttps://blog.shameerc.com/2016/04/export-selected-rows-from-mysql-tablehttp://blog.shameerc.comhttps://blog.shameerc.com/2016/04/export-selected-rows-from-mysql-table<![CDATA[As a programmer or system admin, taking database backup is an inevitable task that we have to do. mysqldump is the de-facto tool for exporting data from MySQL server. It allows us to easily export databases or selected tables very easily. For instance, we can use the following command to take a back]]>Thu, 28 Apr 2016 00:00:00 +0000Stress-free refactoring with Scientisthttp://blog.shameerc.comhttps://blog.shameerc.com/2016/03/stress-free-refactoring-with-scientisthttp://blog.shameerc.comhttps://blog.shameerc.com/2016/03/stress-free-refactoring-with-scientist<![CDATA[I love refactoring. It is highly risky and challenging as I might break the production system and loose business. At the same time, it's a rewarding experience to improve the code which is less performing or buggy. For the past couple of months, I was working on a legacy codebase to introduce a numb]]>Tue, 08 Mar 2016 00:00:00 +0000Setting up Let's Encrypt SSL in Ubuntu 14.04 with Nginxhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/02/setting-up-lets-encrypt-ssl-in-ubuntu-1404-with-nginxhttp://blog.shameerc.comhttps://blog.shameerc.com/2016/02/setting-up-lets-encrypt-ssl-in-ubuntu-1404-with-nginx<![CDATA[Or in other words, Zero to SSL in three minutes I was really excited about the Let's Encrypt free ssl service since their first announcement. But I never tried to install it, mainly as I found the documentation a bit difficult to follow. Today, after reading the article in nginx blog, I've decided ]]>Tue, 23 Feb 2016 00:00:00 +0000Installing PHP 7 on Mac using Homebrewhttp://blog.shameerc.comhttps://blog.shameerc.com/2015/12/installing-php-7-on-mac-using-homebrewhttp://blog.shameerc.comhttps://blog.shameerc.com/2015/12/installing-php-7-on-mac-using-homebrew<![CDATA[Here is a quick way to install PHP7 on Mac, in three easy steps. brew update brew install homebrew/php/php70 export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH" Alternatively you can add export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH" in .bashrc to permanently change the path]]>Mon, 07 Dec 2015 00:00:00 +0000Automatic construction injection in Slim 3http://blog.shameerc.comhttps://blog.shameerc.com/2015/10/automatic-construction-injection-in-slim-3http://blog.shameerc.comhttps://blog.shameerc.com/2015/10/automatic-construction-injection-in-slim-3<![CDATA[In the previous blog post we have discussed how to replace the default Pimple Container with Aura.DI in Slim framework 3. Aura.DI gives us more flexibility in terms of managing dependencies. We saw one most useful feature in Aura.DI, Inheritance of contructor parameters, that will help us to avoid r]]>Sat, 17 Oct 2015 00:00:00 +0000