Skip to main content


Showing posts from 2011

AppRepo updates.

Some updates I did on AppRepo throughout the weekend:
Use .catalog instead of browser pluginSupport multiple distributions Use icon instead of lead imageBrowse by category Nicer templatesOpenID profile settingsCategorization using PackageKit Categories listScreenshot gallery Its now looking quite good, though would need a nicer search UI.

Credits to MavJS, and Exsanetol for helping me up to add some more contents into AppRepo.

Local behavior support for Dexterity

Just created this:

Back in MyGOSSCon, Dylan Jay of Pretaweb mentioned about his discussion on getting rid of content type concept altogether and replace it with just Deco type.

It sounds to me a lot like having local behavior for Dexterity, where each content may have its own set of behaviors assigned. So you can just add a Dexterity content, and if suddenly you decide you want to add more fields or behaviors, just for that content, you can just assign the local behavior on it.

eg: you added a Page, but suddenly you think that this page should be an event. The main way to do this is to delete the page, and create an Event instead. But with local behavior, your can just assign an Event local behavior and the content will have the fields and viewlets needed to turn it into an event.

If you are interested in above, you might also be interested with this :

Fedora Activity Day KL January 2012

Fedora Activity Day is BACK!!!,

Date: 21st January 2012, 10am-6pm
Location: UCTI/APIIT

Submit a session here:
View submitted sessions here:
Register here:

What is FAD?

The Fedora Activity Day (FAD) is a regional event (either one-day or a multi-day) that allows Fedora contributors to gather together in order to work on specific tasks related to the Fedora Project. It is usually held in Barcamp format, and the activities ranges from simple introductory talks to a whole day of building new features for Fedora. Example activities includes:

TalksSprints/hackathons - coding sessionWorkshopsDiscussion group - eg: planning on how to promote Fedora in Malaysia
But wait, what is Barcamp?

Barcamp is an open, participatory workshop-events, the content of which is provided by participants. Talks and sessions for each days are proposed by attendees , usually on-…

gpk-install-catalog: a gem which is somewhat hidden

Just discovered this:

Apparently PackageKit have a format for describing how to install multiple packages.

[PackageKit Catalog] InstallPackages(fedora)=packagename1;packagename2;
This fits my usecase for AppRepo very very well. Should I discovered this earlier, I would have started coding AppRepo way back, but what made me procrastinate was the lack of easy way to tell the user's system what packages should be installed, and the browser plugin was quite flaky (still flaky today too, at least it doesn't crash as much).

Will be adding a button for download catalog in AppRepo later today.  User can open the catalog file using gpk-install-catalog. This method works better across browsers too, as users does not have to have the browser plugin installed.

Announcing AppRepo

So after 4 years from my old post about this, finally I implemented it somewhere.

Introducing the new, shiny, :D

So what is the project?. In essence its nothing much, just a website which list applications for Fedora, allow user feedback and rating, and make it easier for users to discover applications in Fedora. It is basically yet-another-appmarket/appstore, but focusing on Fedora packages.

We already have PackageKit Add/Remove Software tool, why bother?

The problem is the package approach. To the end user, the concept of packages is foreign and scary. The cryptic names of packages and also the listing of non-application packages simply overwhelms them.

It is also difficult to discover interesting applications in a package management tool. Unless you know what you are looking for, its very easy to get lost in the vast gallery of library packages, data packages, meta packages, and application packages in the repository.

As the repository grow, it also mak…

Obviel.js: Object, View, Element Javascript lib

I just saw the posts by Martijn Faassen related to Obviel, I was quite busy this past month that I did not notice them, and due to my mail filters I also didn't notice I was added into the obviel googlegroup. (Sorry Martijn >.<)

Anyway, a year ago until a few months back, I was working with Martijn for his client project. It was a pleasure working with him and I learnt quite a lot from him. In the project, we utilize a pattern to allow us to write dynamic site using javascript for the frontend, and JSON at the backend. The server controls what would be displayed in the frontend by returning JSON objects with a specific iface (short for interface). Obviel was then born out from it.

For example, a simple hello world app.

$(document).ready(function(){ $('#main').render('http://path/to/app.json') })
Where app.json is :

{ iface: 'print', message: 'Hello world' }
And the obviel view defined as :

obviel.view({ iface: 'print', r…

[HOWTO] Using Diazo as a standalone server.

Just a little quick note.

Diazo, the super cool theming system used by Plone, have 2 WSGI middlewares which will turn it into some sort of theming proxy for any existing sites. However, that feature and the steps to use it is not quite documented anywhere.

Then I saw dv.xdvserver in PyPi. Using the sample paster config file from there, here is a little guide on how to use it.


I have uploaded my buildout to github kagesenshi/diazoserver. To deploy, just follow these steps:

got clone git:// cd diazoserver python2.6 ./bin/buildout -vv
The steps above will pull and install diazo and its dependencies into the buildout.


Copy diazo.ini-sample as diazo.ini. Change the address to address of your app. Take note that the Paster proxy might not work if the backend site is compressed.

Edit the static/rules.xml file and static/index.html file as you wish. For full documentation on how to utilize them, vis…

diazotheme.bootstrap : Twitter Bootstrap based Diazo theme for Plone4.1+

I was introduced to twitter's bootstrap css toolkit quite a while ago, and loving it.

Naturally, I want to use this in Plone, so I went ahead and build a Diazo theme and transformation rules which utilizes it. The end product can be seen in  Inigo's updated website, and also Fedora Malaysia's site.

I've uploaded the code into github repository at, so feel free to fork it and use in your projects.

Some notes:
To enable the dropdown menu navigation, you'll need to have webcouturier.dropdownmenu installed.The theme support 3 belowcontent portlet columnsThe theme support 6 footer portlet columns, where the 6th column, is a bit smaller Some future plans (if I find free time to add them):
Use bootstrap's tab system for the edit bar Use html5slideshow for the presentation modeNicer folder_contents view Nicer edit viewUpdate: rename to diazotheme.bootstrap, because I just realized that plonetheme.bootstrap name is al…

[hackpatch] Single workspace Alt+Tab / Alt+~ in Gnome3

The default alt+tab functionality in GNOME3 displays all apps and windows from all workspace. This probably is cool for non-power user who just use workspace to keep their current view uncluttered.

However for people like me who launch tens of windows and apps, and work with multiple project at once, and rely on the workspace to keep us in context with the project, the all workspace alt+tab is one heck of a confusing feature. This is especially true when I have multiple reference documents, and several browser windows opened, where some are meant for ProjectA, and some are meant for ProjectB. Any mistakes in alt+tab will cause me to get lost trying to go back to the right workspace, and the automatic reordering of alt+tab app icons based on last focus added the confusion even more, forcing me to stop for a while to find my bearing.

Anyway created a patch to make alt+tab showing only windows of current workspace.  Its quite rough, but good enough to keep my sanity.

WARNING: Things m…

CampusCamp : Building communities in educational institutions

So I created yet-another-barcamp-spinoff. :-)

What is CampusCamp

In general , CampusCamp is a BarCamp for educational institutions, targeting specifically the people inside the educational institution itself, such as undergraduates, postgraduates, staff, and lecturers. The goal is to get these people to start sharing whatever they know, love, or doing.

Whats the difference compared to normal BarCamps?

Not much. The only major difference is the target audience. CampusCamp target only members inside the educational institution itself. External audience are allowed to attend, however, only if the college allows it, and CampusCamp will limit the number of sessions available for talks given by external people. 
The reason of the limit is so that we could give way for more talks by the members of the educational institutions itself. It is also to make it easier for the students who are organizing CampusCamp to handle the audience.

Goals of CampusCamp

CampusCamp primary goal is to nurture t…

FUDCon Pune 2011

I arrived in Pune around 3AM Friday together with Harish Pilllay (harish), Eugene Teo (eugeneteo) and Heherson Pagcaliwagan (azneita) after a long 5 hours flight from Kuala Lumpur + 6 hours taxi from Mumbai - because the taxi driver were lost several times. Had a short sleep and the day started at around 7AM as we need to catch the bus to the FUDCon venue, which was at College Of Engineering Pune.

At COEP, it was great to be able to finally attach faces to those nicks and names which I've known for quite some time in IRC and mailing lists. We also manage to meet up with Jared Smith, the Fedora Project Leader, and it was great sharing ideas and chatting about Fedora with him.

The way FUDCon Pune was ran - especially the first and second day - reminds me a lot of FOSS.My - the general FOSS conference we once had for 2 times, which no longer around to give way for more specialized conferences. The format, the audience, gave me a lot of dejavu throughout the day, with one differenc…

Going to FUDCon Pune

Just got my visa. See you all there!

Dennis Ritchie (1941-2011)

A titan of which all tech giants and all of us stands on

Opps ..

Opps , to Fedora Planet, sorry that some old posts appeared in frontpage .. I changed my feed to aggregate the PlanetFedora tag instead of Fedora, and tagged a number of old contents ..

but seems like PlanetPlanet sorted items by updated date rather than published date ..

A simple demo application using collective.trajectory

Last week I wrote about a Plone library called collective.trajectory which allows you to do url routing on Plone content type. Back then it was only able to route the context, but I have yet to try develop something on it yet.

A few days ago on, I gave a talk on it, so naturally, I'll need to test to develop something on it first before doing the talk. Using trajectory, I hacked together a simple app, which fetch a profile page from Facebook, to demonstrate the library capabilities. Here's the howto.


Create a content type which can be added on any part of site, where if user load a subpath of the content, it will load a profile info from, and serve it as a context in Plone.

Creating an archetype project

First you'll need ZopeSkel in your buildout. Add this section into buildout.cfg:

[paster] recipe = zc.recipe.egg eggs = ZopeSkel PasteScript
Execute ./bin/buildout install paster afterwards. Once thats done, you should have paster c…

Email server with Postfix, Dovecot, and LDAP

I think I'll skip the introduction as this is mainly a note for myself

The LDAP Setup

I'm not going to cover how to setup LDAP. The setup that I'm using for this system is organized where all users are under an Organizational Unit called 'people' (ou=people,dc=organization,dc=org) with this schema:

dn: uid=user,ou=people,dc=organization,dc=org objectClass: posixAccount objectClass: inetOrgPerson uid: user homeDirectory: /home/user userPassword: <passwordhash>

Configuring Dovecot

Add these into dovecot.conf

mail_uid = 5000 mail_gid = 5000 auth default { mechanisms = plain passdb ldap { args = /etc/dovecot-ldap.pass } userdb ldap { args = /etc/dovecot-ldap.user } # for postfix to authenticate against socket listen { client { # Assuming the default Postfix $queue_directory setting path = /var/spool/postfix/private/auth mode = 0660 # Assuming the default Postfix user and group …

Radiate: A simple push server for SocketIO (alpha)

Based on my previous post on WebSocket server using Tornado, I've hacked the code more to be a SocketIO server instead of just WebSocket, so that it can be used on many browsers until everyone support WebSocket. The SocketIO connection is handled by TornadIO, a neat SocketIO library for Tornado.

I've uploaded the code here in github:

I've packaged Radiate together with a buildout.cfg, so you can deploy it easily by just using these few lines of commands
git clone radiate cd radiate python ./bin/buildoutTo start the daemon, just execute:
./bin/radiate-admin fgThe readme file on how to deploy and use Radiate is here:

Simple websocket push service using Tornado

WebSocket server side documentation/guides around tend to be very node.js oriented. However, I don't fancy rewriting stuff I already have simply to be able to make use of WebSocket. After some research, I figured out a mechanism for a service which will handle push for WebSocket, in a simpler manner which are familiar to everyone - simple POST/GET!

Example server code: (on Tornado 11.0)

import tornado.ioloop import tornado.web from tornado import websocket GLOBALS={ 'sockets': [] } class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") class ClientSocket(websocket.WebSocketHandler): def open(self): GLOBALS['sockets'].append(self) print "WebSocket opened" def on_close(self): print "WebSocket closed" GLOBALS['sockets'].remove(self) class Announcer(tornado.web.RequestHandler): def get(self, *args, **kwargs): data = self.get_arg…

Introducing collective.trajectory : URL Routing, in Plone!!

When I was working with Martijn Faassen, I was introduced to traject, which is a library written by Martijn for URL routing. It is available to be used in Grok using megrok.traject, also by Martijn.

From that experience, I had the idea of integrating traject with Plone content type, so that we can have neat things like:
multiple instance of SQL application, in a single site, where each instance have different database url. Use plone as the frontend proxy to other applications, where items from that application can be accessed through plone.Those above are my primary motivation, but who knows what else this thing might open possibility to
I'm also hoping by having URL routing we make it easier for non-zope programmers to start developing stuff on Plone, as thats the common mechanism used in other Python web frameworks, and ZODB and graph traversal is something unfamiliar.

I've uploaded the code into collective. Only tested it roughly, but it works here on my Plone 4.1 buildout.


Tracking email conversation in OpenERP Issue tracker.

So in Inigo we're trying to see whether we can use OpenERP for our support system. However, the email integration sucks, to the point that I had to hack it.

Hooking up email fetching to the issue module

This one is easy but not easily noticeable how to configure it. Take note that you need to use the extended UI.
open : Sales > Configuration > Email > Email ServersCreate an account to fetch from the support email account and hook the Model field to project.issue

Hooking up email sending for 'from' email

You'll to setup this before email sending from OpenERP will work.
open: Tools > Configuration > Email Templates > Email AccountConfigure one smtp account with the support email address

Notifying a user when an issue is created

open: Sales > Configuration > Automated ActionsCreate an automated actionSet trigger date to creation dateIn actions tab, set responsible to the user who will receive the notification emailIn email action tab, set source address t…

Fedora Activity Day KL 2011 is happening on 10th September 2011!! : Registration opens now!

Just how long since I last post here? .. anyway I'm back!!!

Event DetailsLocation : UCTI/APIIT
Date: 10th September 2011
Time: 0900-1800
Web URL :
What is FAD?The Fedora Activity Day (FAD) is a regional event (either one-day or a multi-day) that allows Fedora contributors to gather together in order to work on specific tasks related to the Fedora Project. It is usually held in Barcamp format, and the activities ranges from simple introductory talks to a whole day of building new features for Fedora.

Example activities includes:

TalksSprints/hackathons - coding sessionWorkshopsDiscussion group - eg: planning on how to promote Fedora in MalaysiaBut wait, what is Barcamp?Barcamp is an open, participatory workshop-events, the content of which is provided by participants. Talks and sessions for each days are proposed by attendees , usually on-site, and all attendees are encouraged to present or facilitate a session.
Talk SubmissionAny talks a…

Pidgin and GNOME3

GNOME3 comes with Telepathy/Empathy integration. However, I'm mainly a Pidgin user because Telepathy/Empathy lacks of per-account proxy settings. I always force my IMs to go through a proxy in VPN regardless where I am, but not for other apps, so telepathy/empathy is out of the equation.

Anyway , pidgin users who are like me, here is a little present for y'all.

Pidgin GNOME3 Integration Extension

Just copy the folder into your ~/.local/share/gnome-shell/extensions/ and restart your gnome-shell.

The extension utilize pidgin's dbus API, so it'll need pidgin to be running. I only did some rough test with it only on my Fedora 15 machine, but I believe it should work ok everywhere else.

Now for me to get some sleep XD.

Update: For some reason unknown to me, my git repos dissappeared from The code is now hosted here: To install, create a …

Few days with GNOME3

So I've been on GNOME3 for a few days now. Liking it a lot except for the minor annoyance I mentioned back in my previous post.

I've got over the lack of blinking taskbar functionality as the new notification system works quite nice in filling that gap. However, I still feel the activity overview is an extra step too many to switch windows. Works nice during leisure, but a bit tiring during work.

When was looking through the gnome-shell-extensions git trying to understand how the gnome-shell javascript extension mechanism works, I found an extension called 'dock'. It basically brought the dash panel which appear at the left side of the activity overview to the desktop, so that its accessible outside of the overview screen.

The behavior is pretty much similar to the dash panel, left click to focus on application, right click to view a popup menu which allow you to open new window or select other existing windows.

It works quite ok to fill the gap the taskbar left behin…

Fedora 15 & GNOME3, initial impression

So I upgraded my machine to Fedora 15 last night using preupgrade, and spent hours in trying to clean up my /home from ancient stuff since way back to Fedora 5 as they were causing weird issues.

To those who are wondering: No, Fedora 15 beta is not out yet, its still in late alpha. Beta should be released in few weeks time, but I'm too excited to wait :P. Check out the Fedora 15 schedule for details on release dates.

Upgrade experience

The first several tries to upgrade using preupgrade failed with a "no more mirrors to try" error. After some debugging I found out that preupgrade-1.1.8 was trying to download images/stage2.img, which apparently, no longer around in Fedora 15. Grabbed preupgrade-1.1.9 from koji and the upgrade goes perfectly without issues.

First boot
The bootup went totally fine, and fast, not as fast as the hype said they are, but definitely way faster than Fedora 14 bootup, thanks to Lennart Poettering's systemd!. Quite likely its some of the custom scri…

The problem with time and age of universe (or age of anything celestial)

(ok this is quite a random post, but something that have been on my mind for quite some time)

As we all already know from Einstein theory of relativity, time, is relative to gravity and speed of the observer. An observer which moves at a faster speed experiences time which is slower than another observer which moves at a slower speed. An observer which on a planet with higher gravity experiences time which is slower than an observer which on a planet with a lower gravity.

In the big bang theory, the universe started off at a singularity point which have near infinity mass, with near zero volume, leading to a near infinity gravity. If there is an observer during the big bang, and the observer is within at the point which have the highest gravity, the observer will observe that it tooks longer for the big bang to happen and expand to bunch of galaxies than an observer who are outside the singularity's gravitational field, whom might observe the big bang happened and expanded to bunch …