“Can’t locate ExtUtils/MakeMaker.pm” while compile git

While I was trying install the latest git by compiling the source, I got the following error

Turns out the Perl headers are missing, using yum to install it solve the problem

Update 2015-03-05:

Some said it’s related to the CPAN module, I have no idea what it is, if the above not work, try also install the CPAN by:

Android Activity transition slide in/out animation

This is a very common effect, however the Android framework only provides the slide in animation. This is how I implement all the sliding transition animation. There’s in total 4 XMLs to define the animation, and with the use of overridePendingTransition() in appropriate location you can implement this easily.

pull_in_left.xml  Continue reading “Android Activity transition slide in/out animation”

Install Memcached with PHP extensions in 5 mins (CentOS)

Memcached is a distributed Memory caching system, it is probably the de facto standard of caching facility for high performance web applications. In short, it is a key-value store which runs entirely in the memory, so it’s extremely fast and also proven to be reliable to handle high traffic.

Steps to install on CentOS (just works!)

Run the following commands one by one in the terminal, this will install the memcached server, and the PHP “Memcahe” classes needed to be used by Continue reading “Install Memcached with PHP extensions in 5 mins (CentOS)”

Linode VPS doubled the storage!

Linode doubled the storage space for all customers, according to their company blog post. I can’t believe it, they actually give away resources for free! (well…not exactly free, but they charge absolutely NOTHING for existing customers). Pretty Impressive!

The new Linode lineup:

  • Linode 1GB disk space increased from 24GB to 48GB
  • Linode 2GB from 48GB to 96GB
  • Linode 4GB from 96GB to 192GB
  • Linode 8GB from 192GB to 384GB
  • Linode 16GB from 384GB to 768GB
  • Linode 32GB from 768GB to 1.5TB
  • Linode 40GB from 960GB to 1.875TB

In fact, this is not the first Free upgrade they offer, not long ago they doubled the memory, for me, from 512MB to 1024MB!  This blog is running on a VPS provided by Linode.com, I have been using them for almost a year now. Their service is exceptional I would say, Fast setup time (within minutes), stable network, Easy-to-use yet featured-packed Dashboard and Great Support services. And most importantly for we customers, it’s surprisingly cheap. I recommend all of you to use Linode when you consider a VPS/Cloud Server. They’re not the fastest server in my region (I live in Hong Kong), there are tones of local providers I could choose from, but I still choose Linode for their premium service.

Links:

  1. Go to Register Linode with my code
  2. Linode Offical Website
  3. Linode Blog » Storage Space Doubled!

Generate gitignore painlessly with shell command

When using Git as your Version control, when you don’t want some files to be tracked (e.g. runtime data, caches, runtime config), you need to add them to the gitignore file. There’s some list of files needed to be ignored which is common to all projects using a certain CMS/Framework, those are called Boilerplates code. After some time, you’ll find that editing .gitignore config and to remember the last settings you used can be a headache. Luckily there’s some nice people collected those settings for us, just search gitingore in the GitHub. Now you can even use gitignore-boilerplates command line tools to generate one for you.

How to use gitignore-boilerplates

Here is an example on how to bootstrap a WordPress project with gitignore-boilerplates  Continue reading “Generate gitignore painlessly with shell command”

Debugging website on mobile devices

What happened when your website looks broken on your phone but perfectly okay on your desktop? There is no web inspector that work in mobile device yet. But all you need to do is to connect it with your computer and you can inspect the DOM just like you did on desktop browsers.

iOS (Safari)

  1. Make sure your devices is running iOS 6 or above
  2. Make sure your computer is running OSX Lion (10.7) or above Continue reading “Debugging website on mobile devices”

Animation on the web made easy with Animate.css

Today I’ll introduce a animation “framework” for the Web. The web has evolved a lot since I first learn about web programming. In the past, you need to use javascript to move the elements pixel by pixel to render animation on the web. Now, with the help of CSS3, this has simplified a lot. But since different browsers has different pace of adoption of the CSS3, we have something called vendor prefix (-webkit, -moz etc), Which looks pretty ugly and bulky.

In addition, the css3 syntax could be hard to understand and memorize for busy code monkeys. To solve this problem a cool developer Continue reading “Animation on the web made easy with Animate.css”

How to save a PDF in Gmail attachment to Dropbox in iPad

This sounds like a common task, but the problem is that from the GMail App there is no way to directly transfer the file to Dropbox. The trick is to use Safari.

  1. First, Open the attachment, Click the “Share” button and select “Open In Safari
  2. Then, within the pdf canvas in Safari, Tap once to see the “Open In” bar and from there Select “Open in Dropbox
  3. Finally, You will be prompted a screen to select which Dropbox folder you want to save in, then it will proceed to upload
  4. There you go!

Using CDN hosted Javascript libraries

Some of my favourites:

jQuery

jQuery UI

More jQueryUI: (from the Official Blog post)

WebFont

Boostrap

 

The Good

  1. Your site will load faster for most users
    – CDN always serves the files from the server closest to the user
    – They have set the proper cache header to enable client caching
    – If another site also uses the CDN hosted library, the user already have local cache, so loads even faster Continue reading “Using CDN hosted Javascript libraries”