Skip to content

Recent Articles


Learning Highcharts 4 is out now

Learning Highcharts 4

Learning Highcharts 4Learning Highcharts 4 is the 2nd edition of my previous book, Learning Highcharts, and it is out now. This edition covers Highcharts 4 in 15 chapters with around 430+ pages. Four brand new chapters and one rewritten chapter, the rest of the chapters have been much revised with new sections. In a nutshell, it has nearly 50 percent of new material. Learning Highcharts aims to be the most comprehensive Highcharts book in the market. Moreover, the book comes with a myriad of examples showing you how to recreate from real-life charts with step-by-step approach. It also covers topics such as: APIs, events, integration with jQuery Mobile and Sencha’s ExtJs 5 frameworks, server-side PhantomJS script, Highcharts cloud service and plugins. Read more


Issue on running grunt. Error: Cannot find module ‘findup-sync’

grunt error

This problem occurs when I archive the whole node_modules directory (including the grunt command) to another machine. I have to do this because I have to create an Ubuntu 14 ISO for offline installation containing grunt as a requirement. Generally, this copy across approach works fine but not straightforward for grunt.

Although reinstalling grunt on the target machine works, it is not an option to me,

npm install -g grunt-cli

The real problem is actually the executable, /usr/local/bin/grunt, that is supposed to be a symbolic file which links to ../lib/node_modules/grunt-cli/bin/grunt. Copying across can break the symbolic link which causes the above error when running it. Rebuild the symbolic link and the problem is resolved.



Checklist to configure headless and offline Ubuntu 14


Grub Failsafe boot

Set the boot failsafe prompt to have some timeout instead of indefinite wait

echo 'GRUB_RECORDFAIL_TIMEOUT=5' >> /etc/default/grub

Fsck fix

Don’t ask when fs needs checking

echo 'FSCKFIX=yes' >> /etc/default/rcS


Automatic Check New Release



Apport – sending bug/crash reports



Postfix – Mail transfer agent

update-rc.d postfix disable

apt-check – periodic apt check


APT::Periodic::Update-Package-Lists "0";

More to come when I find out more ….


Building ExtJs/Highcharts Application with Sencha Cmd 4 Tool

Here is a blog showing you how to build application with the Highcharts extension using Sencha Cmd 4 tool. First of all, we generate ExtJs 4 application skeleton with the following command example:

~/bin/Sencha/Cmd/ -sdk extjs4 generate app SenchaCmd4Demo sc4demo

Next we copy (don’t use symbolic link) the whole ‘Chart’ directory into the application directory.

cd sc4demo
cp -fr {path}/{to}/Highcharts_Sencha/Chart .

Read more »


Building ExtJs/Highcharts Application with Sencha Cmd 5 Tool

A number of users have asked me how to build ExtJs application with my Highcharts extension using Sencha Cmd tool. I have been ignoring this question with the excuse of way too busy. Now, my new book is done and I am going to address this here. The aim of this article is to demonstrate that the extension does work with sencha command tool.

Lets start off by generating an ExtJs 5 application with the following sencha command:

sencha -sdk extjs5 generate app HighchartsSenchaDemo hcExtJsDemo

Read more »


Postgresql – command line to return a single size value of databases

Return the total size usage of a particular database

psql -c "SELECT pg_database_size(pg_database.datname) FROM pg_database WHERE pg_database.datname = 'MyDatabase'; " -t -h localhost -U postgres

Return the total size usage of all the databases

psql -c "SELECT sum(pg_database_size(pg_database.datname)) FROM pg_database;" -t -h localhost -U postgres;



Converting HTML document with IMG src link to IMG embedded data in PHP

In my previous blog, I need to convert a HTML document with IMG src link to IMG with embedded base64 image content. Here is a PHP script that scans the HTML document and replace the IMG tags with embedded content, i.e. changing from this

<img src='./4/data.png'/>

to that

<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhE....

Read more »


Notes on exporting HTML document with images to Word on Linux

We have a web application (under Ubuntu webserver) with a WYSIWYG html editor which let users to create a report template with custom tags. These custom tags are then resolved to technical graph images and embedded into the report. This application allows users to

  1. preview the report with graphs on the web browsers
  2. schedule to generate the report which then export to Word document and deliver via email attachment.

Read more »


Creating Bash 4.3.27 source package

Due to the severity of shellshock bug, I have to patch some of the internal legacy systems, like FreeBSD 8.0 which there are no more updates available. The only way I can update is to download the source from GNU site and build from that. However, the main source package is only available at version 4.3.0 at the time of writing. To remove the shellshock bug, it needs at least version 4.3.25. Although all the patches are located in the bash-4.3-patches directory, not of all them were created by pointing to “../bash-4.3″ directory, some with different names.

So here it is, I have created this bash source package 4.3.27 with all these patches. I built it on FreeBSD and it passed the env test.


Highcharts extension for Sencha ExtJs now includes Highmaps support

The new release now includes Highmaps support. A new online demo is setup and the demo code is included in the new release under the directory, highmaps_demo.extjs4. Read more »


Get every new post delivered to your Inbox.

Join 38 other followers