Getting an object's (reflected) methods

The problem

Sometimes we don’t have access to the platform docs on which we are working, it’s incomplete or we just don’t feel like looking for it. In those situations, we usually need more than the typical object’s var_dump, which only shows us the object properties but not its methods, which usually gives us that function we are working on without having to dive into the object’s properties. Here you’ll see the function I use for this task. This function uses the ReflectionMethod class, which gives us info about a method. It needs the classname and method’s name as params for its constructor.

Using piwik's API locally with ProcessWire

To track jglab.me visits I use Piwik. Why? The main reason is because it allows to keep info private, moreover, Piwik offers a powerful API which can be queried locally, and that is important for performance as we can obtain stats about the website without having to query external server. To make local queries I use the following class:

Show me the code

Installing magento2 on cwp

Getting started

In this post I’ll explain how to install magento2 in CWP, using php7 and mysql 5.6. Firstly, we need to compile php with the correct extensions magento2 needs. If you use this configure command with php7, magento2 will work like a charm.

Getting 1.5s page load time on a basic vps

The problem

As you can see on the graphics, I had 5s load time for my home page, which is kind of basic. It wasn’t that bad if you look at the packages my server runs: gitlab, Roundcube’s webmail, sentora (open source control panel) and piwik (stats management).

Note: Those 11s peaks you see there were produced while I was doing load tests on my server.

My environment’s specs are: