How To Install & Run Composer Binaries Globally

Take PHPUnit as an example. You can install it using Composer doing this : composer require phpunit/phpunit This will install a phpunit shortcut in vendor/bin directory. This obviously means you can run it. But, you would have to point to the exact location of the phpunit file to run :  /home/username/mysite/vendor/bin/phpunit phpunit.xml But, that’s long and uncomfortable. And you would have to install PHPUnit separately for each projects. I’m gonna…

Earth Day Special – 21 KMs of Exploration

Today is Earth Day, a special day dedicated to our mother Earth. I didn’t knew about this day until I saw the Google Doodle today morning at 12:15 (around-ish). When I looked it up, I saw the ways to participate in this event : Walk to work, cycle or take public transport Cycle ? That’s my favorite thing besides coding. It’s a way I could relax and exercise without losing…

Doing Random Things in PHP

Suppose you want to display something randomly in a news feed, or pick random elements from an array, or anything random in general. Programming Languages are used to define the way how something must be done. Hence in a technical way, it can’t do things randomly on it’s own. Otherwise it would be an AI (Artificial Intelligence). Doing random things is not done at compiling, but in execution. In case…

Theme Version 2

If you are reading this post, you should have seen the new UI of my blog. It’s a custom made theme created in a week during the exams. It’s similar to the old theme because, I liked it colorful and dark at the same time. I’m a Batman fan and black is good for the eyes. As a programmer, you don’t want to hurt your eyes. The theme is named…

Vote For Lobby

I have mentioned before about my new project Lobby – A Web Operating System. I have been developing it for the past 1.5 years in my free time. It has been partially completed. To learn more about it, I request you to read this. I’m writing this post to request you to vote for the package Lobby in PHPClasses. If Lobby win it, more people would know about Lobby and…

Convert Seconds To Hours, Minutes in PHP

Say you’re running a process that runs in the background. It’s better to not let the user lose their patience and tell them when it will finish. But, you have the time remaining in seconds. If we show the user : 567 seconds to complete He/she (user) would have to take a calculator and convert it into minutes or hours. Or if the guy/gal is not a math genius, he…