Skip to main content

Posts

2023 Side Projects

March 2023 - Setup & Launched Point Of Sale system for NGO using Loyverse Learning :  Pros: Can setup on multiple devices, on the go, in store, user friendly, fully supported printer and bar scanner, free version available Cons: OUM settings is too simplified but still able to fulfill the requirements.  Dec 2023 - Setup an open source Knowledge Based System using Growi for NGO  Deployment: Docker container Reference : Install Docker using APT Repository Install Docker Compose sudo apt install docker-compose Install Growi on Docker Growi docker is using node js, elasticsearch  and MongoDB as its tech stack run on detached mode! docker-compose up -d update the docker-compose.yml to use the same network networks:   growi_network:     driver: bridge Mount Elastic Block Storage (Free Tier given by AWS) for Docker usage. to solve out of storage of basic storage given is on 7.6gb. EBS is 20gb extra!! lsblk df -h sudo mkdir /mnt/xxx sudo mount /dev/x...

Some weird keyboard ISSUE + Ubuntu

 Recently my ubuntu OS  drives me crazy until i keep upgrading to the latest version. Even had issue where post upgrade the system crashed. lol and i reformat back using bootable USB Drive. You can watch how i did it! recorded and uploaded to my YouTube channel . Now im at the Ubuntu 22.04.1 LTS version! Everytime i typed on my keyboard. the numbering goes crazy, the symbols goes crazy..the mouse goes crazy. Until one time i just tried to change the Keyboard setting to English (UK) from English (US)   and it works.    sometimes it works temporarily.  sometimes it work for long hours. still monitoring. but this is my current workaround.  really an old laptop.    takder ke yang nak sponser lappie baru :P

Learning Flutter (Part 2 - Install / Update Android Studio)

As my Android studio is outdated. Going to install a new one  https://developer.android.com/studio?utm_source=android-studio after downloaded the compressed tarball (.tar.gz) , extract to /opt directory! yeah i override the old one, as i have nothing to worry on eg environment settings. why need to store it in /opt directory? read this please :D  so i have something like  /opt/android-studio then we do the Android SDK update  . . . . today practice is a lot of waiting time :D . . .  Done  then install the Flutter & Dart plugins! ok then updating my Android emulator image! lol.  ..... another waiting time, i can say this practice should be done parallel with other activity. haha yes i am. very light2 and chill2 :D...  tutorial reference https://docs.flutter.dev/get-started/editor

Rounding Number to the nearest 0.05 SEN!

helping out ngo for some excel work. jotting this down for others reference~ example gsheet formula. mround(cell/range of cells, to the nearest 0.05)   = mround ( F25 , 0.05 )   rounding cent reference  https://www.bnm.gov.my/misc/-/asset_publisher/2BOPbOBfILtL/content/about-the-rounding-mechanism

Learning Flutter (Part 1 - Install Flutter)

 Trying to learn something new. Want to start with Flutter first. I do have some experience developing Android APP but that was a decade a ago. Using Android SDK to develop from scratch. However as time changed in a glimpse. Now its time to explore a new SDK! Flutter~   First i followed the instructions on how to install Flutter on my linux machine https://docs.flutter.dev/get-started/install/linux encountered few issues.  [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)     ✗ cmdline-tools component is missing       Run `path/to/sdkmanager --install "cmdline-tools;latest"`       See https://developer.android.com/studio/command-line for more details.     ✗ Android license status unknown.       Run `flutter doctor --android-licenses` to accept the SDK licenses.       See https://flutter.dev/docs/get-started/instal...

Lets improve Website speed

 Salam All! Today i have the privilege to do some website analysis. The main objective is to improve the current website speed and performance. Well, tbh there's less sale on the website, however the purpose having it available is for reference. Most of the sale transactions happens on Shopee~   First i ran the GTMetrix performance analysis.  https://gtmetrix.com/reports/4nutz.tk/j42YIXSg/  you can see the report completely! here are some screenshots ! fyi im not using any cdn to do the script and image caching, due to my target audience is in Malaysia itself. And the server i deployed is from Singapore.     Steps that i take to improve the speed! Change to only use Webp images! Ive done this step previously, however didnt cater all images. For homepage lets convert all the visible image to webp! Will update from time to time this post! Troubleshoot file loading time Using browser console we can see which scripts taking long time to load then from there we ...

Automate Letsencrypt Certs renewal for Docker with Multisites Wordpress

 Assalamualaikum,  Well to understand this post you will need to read first how i set multiple Wordpress sites in Docker containers ~   LetsEncrypt Certification Auto Renewal   Ok the trick that i did to automate the renewal process is  1. Create 2 separate docker file I'm not able to create a single line letsencrypt command that can run cert renewal for two different domains, thus this is a hack way. If you have any suggestion let me know please!   ls -l wordpress/docker-compose* -rw-rw-r-- 1 cxx cxx 2421 Jun  7 11:32 wordpress/docker-compose-4nutz.yml -rw-rw-r-- 1 cxx cxx 2442 Jun  7 11:28 wordpress/docker-compose.yml For file docker-compose-4nutz.yml small change made on the certbot definition, where i commented out the volumes for another website / kedaibiskut. Highlighted you can just totally remove it. Ensure the command is correct only for one domain and one path. certbot:     depends_on:       - web...

Create a simple Delivery Calculator

 Assalamualaikum, As previous post , i mentioned that i wanted to create a simple distance calculator for own usage. Of course i didn't do it by myself. I watched this tutorial and download the code to start coding.  And obviously i need to customize and do a little tweaks to get the result that i wanted. Plus i apply the code into Wordpress framework by extending the Child Theme What i did was, i separate the JS function from the html code. Adding the JS script and enqueued it. Steps.  Introduce JS script,  sudo vim assets/js/calculate_distance.js   script content the additional changes that i did was, adding delivery charge calculation for the front end, i create a page template that later loaded in Wordpress page, checkout my previous post the page template content the changes that i made is on the Google Places API key value, include new labels that displays the result after the user submit the form / click "Calculate" button, preset the input value for...

Create Custom Template Page in Wordpress Theme

 Assalamualaikum...     Wanted to create a simple page that can quickly get a delivery quote for my customer~    Issue with Wordpress is most of the time need to fill up the address details before getting full quotation as im using a free plugin that is not so user friendly.    While I have manual quotation request incoming to our 4nutz social medias, i decided to spin up a tool page that help to quickly calculate the pricing.   ok today wanted to share first   How to create a page template in Wordpress theme?   Reason doing so is so that we do changes in the wordpress theme or the best is the child theme. not directly apply in database the code nor hacking the wordpress framework code! that is really hard and headache to maintain!   For those who dont know how to create Child Theme, please refer to this tutorial first!   Step one, create a php page file in Wordpress Theme/ Child Theme vim page-distance-calculator.php Step two,...

The Boring SD Card Reading Issue on Ubuntu [SOLVED]

 Hi All, Sharing this as a simple solution.  Easy Peasy. First open "Disks" application... "Eject" the SD card first.. Then reinsert back the SD Card.. Wow problem solved.

Multisites on Docker Container (Wordpress framework)

 Assalamualaikum.   Photo by Domenico Loia on Unsplash   Short story, i want to replicate https://4nutz.tk to https://kedaibiskut.tk  and  i want them to keep running on docker containers. If you haven't know how did I setup the docker infrastructure for https://4nutz.tk you can read first my previous post.   I have to admit that i didn't study nginx proxy first to implement the multisites. this is more like a hack way ~ i'm just going to highlight what is important ya. 1) Created a new database in existing container mysql. dump 4nutz db to kedaibiskut. yeah i m doing this because i totally wants everything retains! later on i ll customize the data. this is due to basic configuration needed i already done all in 4nutz. for more details on  how to dump and retrieve wordpress db data checkout those posts! 2) i created a new wordpress container for the new website, for the content i copied all from 4nutz wordpress and of course change the wp-config....

Error on running Certbot Container on Docker

 ERROR: for certbot  Cannot start service certbot: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 0 caused \\\"error running hook: exit status 2, stdout: , stderr: fatal error: runtime: out of memory   what a long 3 nights (not that i don't sleep, continued doing and fixing in 3 nights~) that i have been trying to figure out how to solve this problem!  Posting on separate post so that can highlight this issue.  In the beginning i thought it is due to wrong docker-compose.yml setting for certbot! weird because when i first using it for setting up 4nutz.tk there is no such issue! I am rerunning it again to setup for kedaibiskut.tk !   at first my command used was for multiple webroot path. but then i realized naah lets try with a single one! issue still occurs.   i even run with verbose flag to see the error details! ...

(Docker Solved) Post-processing of the image failed likely because the server is busy or does not have enough resources ERROR

Hi All!   Photo by Markus Spiske on Unsplash   Post-processing of the image failed likely because the server is busy or does not have enough resources. Encountered this issue, when uploading media files to my 4nutz.tk website! To solve this issue it might comes from PHP setting and Nginx settings. Thus i took the chance to fix both!   Fix PHP settings First i increased the minimum size file upload in PHP settings by introducing new php.ini / uploads.ini file link to local file to the wordpress container  example in docker.yaml file setting.   wordpress:     depends_on:       - db     image: wordpress:5.1.1-fpm-alpine     container_name: anutz_wordpress     restart: unless-stopped     env_file: .env     environment:       - WORDPRESS_DB_HOST=db:3306       - WORDPRESS_DB_USER=$MYSQL_USER   ...