E-Code Verifier relocated

E-Code Verifier is a free web application for checking/verifying Shariah status (Halal, Haram, Mushbooh) of E Code (food ingredient codes). It was developed as a PWA and published in Jun 2016 at ecode.halal-haram.com. By the time of July 2018, it was hitting 12k+ traffic monthly from search engines (without any kind of promotion) and also a good number of usages from desktop/mobile installations.

E-Code Verifier Analytics of 2018
E-Code Verifier Analytics of mid-2018

A few months ago, the domain “halal-haram.com” got expired! And I have been very busy at that time and didn’t notice! When I realized it, it’s already too late to recover. So, I have relocated it to ecode.figlab.io.

I hope it will become useful again and will save thousands of Muslims from consuming foods with haram ingredients unintentionally.

A free, hosted, advanced wiki – Dropbox Paper

Around a year ago, while starting a new project, I was asking a friend and colleague for a suggestion between Docuwiki and Confluence to use as team wiki. He suggested trying Dropbox Paper instead. I’ve tried, and the result was amazing!

Since then, using it as the team wiki for several projects happily. In this post, I’ll share some of the points which convinced me to use Dropbox Paper as a wiki (or alternative of wiki) for a team.

Why Dropbox Paper?

Take 3 minutes to go through the following points and screenshots. Hopefully, you’ll find Dropbox Paper a good fit for many of your situations where you’ll use a wiki.

Continue reading →

Merge Images and PDFs into PDF

When working with PDF documents or scanned images, it’s a pretty common task to merge them to PDF. We have been doing these things using imagemagick and ghostscript for years. But we had to compromise with a few serious drawbacks of that process including converting PDF pages into image snapshot and increasing file size. So, eventually, I have written merge2pdf a tiny cli tool for this job (and a few extra).

This post is to show some example usages (commands) of this tool for different scenarios.


Before diving into commands, let’s go through a list of highlights of this tool.

  • Lossless quality by default. Option to adjust JPEG quality
  • Can be merged all pages or only specific pages of PDF
  • Supports a wide range of image formats
  • Options to adjust size, margin, and scaling of images
  • Supports directory as input (merges all Images/PDFs of a directory)
  • Free and open source
  • Very simple and easy to use

Continue reading →

Backup your database periodically to free cloud storage

Database Backup Mega.nz

You want to keep a periodical, automatic backup of your database. And, for safety, you are thinking to keep these backups to a (preferably free) cloud storage. Then this post is for you ?.

It can be done in thousands of ways. But, I am trying to show you an easy, almost effortless process. Just bear with me for 10 mins and you’ll see it’s happening.

Let’s start.

Continue reading →

Adding watermark on image or PDF with PHP

Watermarking with PHP is not a complex thing. Google will list hundreds of solutions using GD or ImageMagick. But the complexity starts when I need custom positioning, rotation, repetition etc. Though all those things are just a matter of tweaking some options in ImageMagick or GD, discovering them every time is a pain. So I just encapsulated all those tweakings in a PHP library.

Check it – ajaxray/php-watermark

Continue reading →

Dependent / Cascading Select List with jQuery Select2

Select2 is one of the most popular select list plugin for jQuery. It has beautiful features and powerful customization options.

One missing feature of Select2 is built-in support for making select boxes cascading/dependent. In simple words, loading/refreshing options of a select2 list box using ajax based on selection of another select2 list box. So, I’ve written a reusable class for this purpose.

Get it here – Select2 Cascade (for v4.x)

Looking for a demo?

Here is it – live demo.

Thanks to Codepen, JSON Blob and Twitter Bootstrap for making demonstration so easy!

Continue reading →

Convert Excel TSV to CSV in vim

After Copy-Paste some data from MS Excel spreadsheet, it appeared to be half thousand TSV (Tab Separated Values) lines in vim. Then it took around 20 seconds to convert it to CSV! So, how did I do it so quickly?

Okay, it was just two simple replace command using vim regexp –


The first line is adding quotes around column values which have comma in it. And the next one is to replace tabs with comma. Done!

Hope this tip will save someone’s time someday 🙂

Store data to Google Sheets using PHP

Google SheetsIn some cases, when you need to dump some data to somewhere easily accessible, pushing to Google Sheets can be a good option. You can store data to Google Spreadsheet from cron jobs, background workers or even simple form submission. For example, in my case, I am logging some information from mailgun hooks.

While I were doing that, it seems like this easy task took more time then expected only because of lack of documentation. So, trying to write down an easy to follow tutorial that can make you set and pushing data to goggle Spreadsheet within 20 minutes.

Continue reading →