Edu Snake Game in Vanilla Javascript

I’ve recently developed a simple yet educational browser-based game called Edu Snake Game. Built with vanilla JavaScript and the Canvas API, this game adds a learning element to the classic Snake gameplay. ...

March 26, 2025 · 1 min

Effortless multi-language content translation in your models

Are you building a multi-language application with CodeIgniter 4? Managing translations for your models can be a daunting task, but CodeIgniter Translatable makes it easy and efficient. This lightweight library integrates seamlessly with CodeIgniter 4’s model system, allowing you to handle translations directly within your models. This library simplifies the process while maintaining the flexibility you need. Key Features Simple Setup: Use generator to prepare basic structure for migrations and models. Dynamic Locale Support: Automatically load translations based on the current locale. Custom Query Support: Retrieve translations efficiently with built-in methods. Integration with CodeIgniter Entities: Works smoothly with CodeIgniter’s entity system. Configuration Getting started with CodeIgniter Translatable is easy. Here’s a quick overview of how to use it: ...

December 29, 2024 · 2 min

Setting up OCI8 and Oracle XE with Docker on macOS

Integrating OCI8 with a PHP environment can be challenging, but recent updates have simplified the process significantly. Follow this guide to get everything set up seamlessly. Adding OCI8 support to PHP Oracle has streamlined the process for adding OCI8 support to PHP. Clear, user-friendly instructions are available in this Gist. Follow the steps outlined to prepare your PHP environment for OCI8. Setting up Oracle XE in Docker Once your PHP environment is ready, you can move on to Docker setup. We’ll use the Oracle XE image available on Docker Hub: gvenzl/oracle-xe. ...

December 23, 2024 · 1 min

Eager and Lazy Loading in CodeIgniter 4

Efficiently managing database queries is crucial for application performance. To simplify it, I made a nice CodeIgniter 4 library that provides two techniques for loading related data: eager loading and lazy loading. composer require michalsn/codeigniter-nested-model These approaches allow developers to fetch related models in an efficient and intuitive way. Here’s a comprehensive guide to understanding and using these techniques. Eager Loading Eager loading fetches related data in advance, minimizing the number of database queries. To implement eager loading, you must define the relations between your models. ...

December 12, 2024 · 3 min

User tracking with JavaScript

If you’ve ever wanted to capture info about your users, you might be interested in this little experiment. With features like automatic page view tracking that logs details about your visitors’ browsers, devices, and more, plus the ability to log custom events like clicks, it’s perfect for anyone who enjoys tinkering with web analytics. The PageViewEvents JavaScript class provides a streamlined way to capture and send data about page views and user interactions on your site. ...

November 6, 2024 · 3 min