James John – Software Engineer

Archives

How I redefined my Getters & Setters Methods with Enums

PHP Enums came in with 8.1 and it has been a very groundbreaking feature introduced into PHP. For me, the getters and setters approach has been modified. Some people agree that the Getters and Setters system is outdated since the defined data type for objects came out, but I still find myself trying to run […]

How I Append Data Into JSON at Constant Time – PHP

php-jsondb is a light framework that provides an object and methods to perform CRUD operation on a JSON file, using a similar interface to that of RDBMS. In a situation where you are within a small scale project, you can use this library to read and store data in a JSON file, allowing cross-language support […]

Why you should avoid Base64 Data URLs Within WordPress Posts

I was working on a project which allows users to submit posts for approval but using an external editor outside the wp-admin/edit.php page. This created room for submitting images within posts as base64 URL, which at some point maxed out PHP shared memory because someone decided to submit a post embedded with a high-quality image […]

IKEDC: New Recharges Fail – REJECT – New Tariff & KCT

Sucks to be a Nigerian, yeah? We have got zero publicity. Things change without notice to the customers, no documentation whatsoever. If this is your first time of recharging your prepaid meter (i.e. activation), you should head here. This post is for existing prepaid users whom all of a sudden can no longer recharge their […]

This Golang Package Splits File Into Parts

A new dawn for me. I was writing C and building something with it. I discovered Go, and now I am rewriting everything to Go, and this is my first public Go package. I showed a friend this algorithm and she asks why it isn’t out there? Took some time to make it standalone and […]

How to Activate Your IKEDC MAP Prepaid Meters

If you have been given this device after fixing your prepaid meter, and given some class tutorial on how to use it but still have not gotten it working, don’t worry, I didn’t get it too. I figured it myself and I am here to help others. If you are yet to get your IKEDC […]

How to Remove all node_modules/ in multiple directories

So today, I am about to make a switch from Debian to Arch. When I installed my Debian, I had not known about installing /etc, /var and others in different partitions. Now I want to backup my /var/www/html which contains most of my project and clients’ to an external drive, but node_modules!!! There are many […]

How I Created AWS S3 Hierarchical File System Using PHP

Story cut short, I got a project to pull files from Amazon S3 and allow users to navigate into sub-directories knowing S3 is a Flat file system. I wrote some PHP functions to take the folders and make them array keys of an multidimensional array. The plan was the put the files into the arrays […]

WP Meta Query: Query to Strictly Get Not Existing Meta Key and Value

This is the second time I am working on a plugin project like this, first time I don’t remember the project so I couldn’t get back the code, had to rewrite it. This time I am making a post so I could come back to it in the future. So in this case, lets say […]

How to Move VirtualBox Machine Disk or Change Installation Path

Been very long I updated this blog, too bad… So few weeks ago I added 1TB HDD to my 256SSD laptop and I decided to move my VirtualBox machine installation folder to the larger space so I can expand and have more space in my home directory. This worked, I am going to show how […]