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

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

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

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