A Simple Way to Use NPM Library in Browser

Occasionally, we need to use a JS library in our browser side, yet it's only available from the NPM repository.

As usual, the Google result of any NPM related questions will bring you more yes-and-no answers, and leave you in further confusions and headaches.

Well, life better be simpler 🙂

Read more A Simple Way to Use NPM Library in Browser

A Small Git Problem
(And why I am still uncomfortable with Git)

Recently, I have used Trac to manage a git project, and I used a git post-receive hook to sync the commit back to Trac.

The hook starts with something like this:

It works fine for most cases, however, when I try to push a new branch to remote, the $oldrev becomes 0, and caused problem.

fatal: ambiguous argument '0..70e0844': unknown revision or path not in the working tree.

Read more A Small Git Problem
(And why I am still uncomfortable with Git)

Git vs SVN

There are so many comparisons of Git vs SVN outside, but as far as I can tell, 99% of them are biased. (And so is this one, probably.)

And there are many Git tutorials outside, and none is clear enough so others could get on hand easily. In fact, it remains to be one of the major drawbacks of Git.

I have used SVN for many years, and used Git for quite a while now. I admit that I am not yet an expert of Git, but I have tried and suffered a number of traps of Git, and I learned a lot from those painful experiences. Some of the traps could get me stuck for one day.

Read more Git vs SVN

Docker Basics

By the Aliyun conference of 2015, I saw a lot of news about docker. And it's the third time of the year that I heard about docker.

I was lucky enough to have some quick conversations with the docker developers there, and I found that it's really mature now. In fact, TaoBao also used docker for the internal deployment procedures, so I decided to try to move some projects of our company into the world of docker.

Read more Docker Basics