Web animations on large screen (MDN post)

Although John Hu had left mozilla, he had wrote a post before leaving. This post is a post that John Hu felt good. Please go to this URL to see the post:


John Hu would suggest you to see the post at MDN's page.


John Hu's Bugzilla

It's time to leave mozilla. For John Hu, it's a special adventure to be in mozilla. This picture is John Hu's Bugzilla statistic page. It shows the work done by John Hu. John Hu had done the followings within 2 years:

1. 309 bugs, 0.5 bugs filed by John Hu per day

2. 3366 comments, 5 comments made by John Hu per day

3. 183 patches submitted, 0.25 patches submitted by John Hu per day

4. 239 patches reviewed, 0.33 patches reviewed by John Hu per day


CSS art - flower

This CSS art is made by a tricky croping CSS effect. The tricky part is to make a leaf. But the hardest part is to calculate the correct math arguments. This CSS art is scalable. You may change the width and height to have different size of flow:


See the Pen Flower icon by John Hu (@john-hu) on CodePen.

How to disable shortcuts at android without rooted?

It's so nice to see android has keyboard shortcuts feature with keyboard attached[1]. But it may be a little annoying that we want to use those keys to do what we want. John Hu had created another open source project called shun-feng-er which is a tool for eye impaired person. During this project, we need to override the behavior of those shortcuts.

Different Indentation on Different Languages in Sublime Text

While writing programs in pyopencl, we should face the indentation of python and CL. According to the coding convention, python uses 4 spaces as the indentation and C uses 2 spaces as the indentation. So, we may want to configure our IDE to have different indentation on different programming languages.

As a user of Sublime Text, I found that the Syntax Specific is the correct place to configure it. If we want to configure C to use 2 spaces as its default indentation, we can do the followings:


The Cost of Open CL

One of my workmate had experiences on Open CL. We had a discussion on the improvement of histogram. And I learned that we should calculate the cost of Open CL before applying Open CL to a topic. The cost of Open CL is the time that we prepared everything for running Open CL. If the cost is larger than sequence code, we would never get any improvement with Open CL. But in most of cases, we will introduce a lot of calculation to Open CL. So, I wrote a program to measure the cost.

The program is pretty simple. We only measure the followings: