Category: How-To Guides

  • Recovery when accidentally blocked SSH connection

    Recovery when accidentally blocked SSH connection

    If you are using a third-party control panel to manage your servers, there is likely a configuration option to set firewall rules. If you accidentally remove access to port 22 from the whitelist, your server will become unmanageable. To prevent this, here’s what you should do beforehand.

    (more…)

  • PHP Send Duplicate Key in POST data

    PHP Send Duplicate Key in POST data

    Some Application Programming Interface (API) requires you to send multiple parameter with same key name. However, associative array in PHP only allow unique key name per each array. Subsequent assignment towards the same key will override the previously assigned values. Here is how to send duplicate key in POST data with PHP.

    (more…)

  • Adding imagick to PHP 7.4 and 8.1 on MacOS 12.6

    Adding imagick to PHP 7.4 and 8.1 on MacOS 12.6

    I’m currently preparing my brand new Macbook Air for WordPress plugin development. I have installed PHP 8.1 using homebrew, a well-known package manager for most software developers using Mac. After installing WordPress, I notice WordPress complained about missing imagick library. I tried to install but encountered an error.

    (more…)

  • RoR: Determining two date within the acceptable range

    RoR: Determining two date within the acceptable range

    There are two dates where the first date is greater or equal to (gteq) and the second date is less than or equal to (lteq). Both dates set to have a rule where it must be within 3 months range. As always, there are always many ways to determine the range of between gteq and lteq. We will discuss three (3) solutions for this case where the third solution is the best way to consider.

    (more…)