Latest Post

Python – Set character encoding to UTF-8

In Python, the default character encoding set is ASCII, limiting us to a bunch of 128 basic characters. Though, in most sites, we may use accented characters or other various symbols. So in the default Python settings, you may come [...]

django-cms-urlprefix

Django CMS – enable URL prefix (useful for proxy URLs)

This modification is to add a URL prefix to all URLs, so all the link generated within the CMS will have that prefix automatically implemented. The reason I have implemented that change is because I had to match the URLs [...]

be-responsive-be-adaptable

Be responsive. Be adaptable.

Responsive design is becoming increasingly popular in the world of web design and development, and this not a coincidence, as I will explain. But first what is ‘responsive design’? Whilst it may sound obvious to some, a responsive design has [...]

osx-lion-python-PIL

Mac OS X Lion: Install the Python Image Library (PIL)

First make sure you have lib jpeg install for JPEG handling 123456$ curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz $ tar zxvf jpegsrc.v8c.tar.gz $ cd jpeg-8c/ $ ./configure $ make $ sudo make install Then I use pip to install PIL 1$ sudo pip [...]

facebook-iframe

Facebook page tab: hide scroll bars from iframe

In the following case, we are using an iFrame to render a page tab in our Facebook page. The page in the iFrame is hosted on a different server. 1. First of all, we need to setup the Facebook app [...]

dart

Will new Google programming language “DART” take off?

Google has recently released the first version of DART, a simplified Object-Orientated Language for the web. It is bascially a language that compiles into Javascript, or can be run from a Virtual Machine. DART aim at easing the programming of [...]

twitter-popup

Elegant Twitter share button and dialog with jQuery

Twitter, Facebook and many other social networking website offers embedded code to add share buttons on our website. The thing is, they all have different dimensions and looks, which can make your page style quite inconsistent. So the idea is [...]

osx-lion-python-django

Mac OS X Lion: The perfect setup for Python / Django

If like me, you are developing Django applications on a Mac, you will probably face a few issues when upgrading to Lion. In my case, I haven’t even upgraded, I decided to wipe it all out and start from a [...]

Ubuntu 9.10: Install PIL in Virtualenv

Re-blogged from Eddie Welker I started with a –no-site-packages virtualenv, so as not to use (or more  importantly depend) on any of the global site-packages.  Ok, cool. 1$ virtualenv –no-site-packages myEnv First, I needed to install the python developer tools. [...]

Code Igniter: Mixing segment-based URL with GET querystring

Working on a microsite running on Code Igniter, I faced a dilema of adding and extra query string in a page URL, which is already using segment based URL (eg. domain.com/controller_name/page/). Basically I’m trying to do this:  domain.com/controller_name/page/?param=myvalue. Unfortunately CI [...]

Create a new Mercurial repository on Mac

Every months or so, I create a new repository for the development project I work on. But I always tend to forget how to setup the repository, so here’s a quick start quide which I found very helpful and I [...]