Archive for February, 2009

The 140 character webapp challenge!

Feb 22 2009 Published by under PHP,Web

I read about this interesting challenge at http://f055.net/article/the-140-character-webapp-challenge/. The idea was to create a web application in 140 characters or less (one twitter message).

I was instantly hooked.

Most of the guys submitted variations of a micro twitter, so naturally, I decided to go for something else. I figured out it would be great to write an application that parses RSS/RDF feeds :)

So, after more then an hour I ended up writing this 135 characters web app:

<?php foreach(file($_GET[u])as$l)if(preg_match('/<(title|link)>([^<]+)/',$l,$m))echo$m[1]=='link'?" <a href=$m[2]>link</a><hr>":$m[2]?>

You can check out live demo here.

I am really glad that I managed to format the output the way I wanted, to have article links and separators, and not only to dump data to browser.

Coding this little app was pure fun. It really keeps you going when you try so squeeze so much stuff into only <= 140 chars. Any programmer out there should try to write one of these small apps.

Comments Off

Gnome + Do

Feb 10 2009 Published by under Gnome,Ubuntu

Some two weeks ago I stumbled upon a cute little application called “Do” at http://do.davebsd.com. Do helps out in a way that it allows quicker access to programs and it performs a set of actions on those programs, all done from keyboard of course. I decided to give it a try after I saw that it comes with a dock too.

You need to install a lot of dependencies (build-dep works only for older version)

$ sudo apt-get install automake1.9 bzr mono-gmcs libmono-cairo2.0-cil gtk-sharp2 libndesk-dbus-glib1.0-cil libndesk-dbus1.0-cil libgnome-vfs2.0-cil libgtk2.0-dev libtool intltool gnome-sharp2 ca-certificates bazaar gnome-keyring-sharp-cli gnome-desktop-sharp2 libgconf2-dev monodevelop-nunit

Since the latest version was not yet in Ubuntu repository, I downloaded the source for Do:

$ wget http://edge.launchpad.net/do/trunk/0.8.0/+download/gnome-do-0.8.0.tar.gz
$ tar zxvf gnome-do-0.8.0.tar.gz
$ cd gnome-do-0.8.0
$ ./configure
$ make
$ sudo make install

Compiling Do’s plugins from source did not do the trick for me. Installation was complaining about Banshee. I did not have Banshee installed, but even after installing it I got the same error.
(Hmm… time to dig into wiki)

So the right thing to do was to install plugins using bzr (distribution version control system)

$ sudo apt-get install bzr
$ bzr branch lp:do-plugins
$ cd do-plugins
$ ./autogen.sh
$ make
$ sudo make install

To start Do run:

$ gnome-do &

Dock does not come turned on by default. To get it running hit “Super key + Space”, type “Preferences” and hit “Enter”. On Appearance tab select “Dockey”.

Installed plugins should be enabled as well. Navigate to “Plugins” tab and check the box next to a plugin you like.

On “General” tab make sure that you check “Start GNOME DO at login” option.

You can use drag and drop to add new shortcuts to dock easily. Dock can be resized in width and scaled, which is great.

Docky

I have been using Do heavily in past two weeks and it has a thumbs up for sure.

Comments Off

Hello world!

Feb 08 2009 Published by under Misc

Hi all and welcome to by blog.

My name is Haris and I am a PHP developer.

In everyday work with PHP and Linux I am faced with interesting challenges which every project brings with itself. Sometimes, even the biggest of these challenges are resolved with the most simplest methods.

This path of constant search for new and innovative solutions is neither hard nor boring. On the contrary. It is full of surprises and interesting solutions.

With this blog I intend to save my experiences, share them with others and use them as a reference when I need it again.

I hope the posts will be of your help as well.

Comments Off

Performance Optimization WordPress Plugins by W3 EDGE