Skip to content

{ Category Archives } Codeprix

Humanizing the time difference ( in django )

django.contrib.humanize is a set of Django template filters that adds human touch to data. It provides naturalday filter that formats date to ‘yesterday’, ‘today’ or ‘tomorrow’ when applicable. A similar requirement which the humanize pacakge does not address is to display time difference with this human touch. so here is a snippet that does so. [...]

Tagged , , ,

Running Glassfish as a service on CentOS

Here is how you run glassfish as a service on CentOS: Create a user glassfish (you can call it anything you want) under which Glassfish will run. #useradd glassfish Install glassfish in /home/glassfish. Create the startup script /etc/init.d/glassifsh for glassfish. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [...]

Tagged , , ,

Embedding flash object in Facebook Apps (FBML)

Yesterday I was trying to include a flash object in a facebook app using FBML fb:swf tag. The flash object needed to change the url of the page it was running on on a particular event. But since facebook prevents direct script access from flash, this could not be done. Here is a simple workaround: [...]

Tagged , , , ,