Blogged in 2009

2009 is the year I came back to blogging. To be honest I didn't write as much as I could or want to. One of my goals for 2010 is to increase quantity and quality of my blog posts.

Viewing svn diff result in vim

Some time ago I explained how to use colordiff to display svn diff's result in colors. You can do pretty the same with vim. It is specially useful when you have big amount of code to commit and it needs to be reviewed first. Vim makes navigating through it easier.

Frets on Fire - Guitar Hero in Ubuntu 9.10 (Karmic Koala)

I just played Frets on Fire, an amazing game which managed to absorb me enough to write this blog post. It doesn't happen to often. Frets on Fire is a Guitar Hero clone for PC (runs on Linux, Mac and Windows).

Chromium - Google Chrome in Ubuntu 9.10 (Karmic Koala)

Google Chrome doesn't support Linux based operating systems yet. However, it is made on Chromium which works on all major platforms. Chromium is an Open Source web browser with the same feature set as Google Chrome. Actually Google Chrome is based on Chromium. The only difference is the logo.

How to use TextMate like snippets in vim?

Snippet is a piece of text which can be pasted into the document. Parts of it can be parametrized or calculated while pasting. Snippets can increase your productivity by letting you to write common parts of code faster and without mistakes. One of the most famous snippet implementations is included in TextMate editor. In vim we have some of TextMate's snippet features bundled in snipMate script.

How to record a macro in vim?

Macro is a sequence of instructions performed as a one step. In programming it helps automating the repeatable tasks which makes them less boring and less error-prone. Instead of performing the same actions over and over again, it's better to record them as a macro. Once macro is saved it can be run as many times as needed. Vim as a one of most powerful editors has macro support built in.

Symphony CMS on nginx

I decided to give a Symphony CMS a try because of its XSLT templating system and structured approach in creating websites. As most of PHP applications it's running on apache out of the box. Since I preffer using nginx I've encountered small problems with the configuration.

Caching the websites with bash script and apache's .htaccess file

Recently I got a task to make a completely inefficient application usable enough to give the development team time for improvements. I didn't know the application and didn't have sufficient time to learn it. In that completely miserable moment I was left alone.

Viewing svn diff result in colors

svn diff allows us to see the changes made on the files in the subversion repository. However, its output is not always clear. We can improve our experience a bit by installing colordiff which wraps diff command and produces coloured output.

Chromium - Google Chrome in Ubuntu 9.04

Chromium is a project aiming to run Google Chrome web browser on Linux. Launchpad repositories deliver apt sources list for Ubuntu which enables us with an easy installation process like usual: add sources and authorization key, update package database and install the application.

Using SimpleXML with sfWebBrowser to parse html documents

sfWebBrowser is a class that emulates browser calls. It gives us nice object oriented interface to navigate through document structure in a programmed way. It can return response as SimpleXML which enables us to use xpath queries on the document being parsed. Unfortunately html pages are hardly ever XML valid documents. That's why in most cases sfWebBrowser rather throws and exception than returns something. Here is how we can write a workaround for it.

Put your stylesheets at the top and your scripts at the bottom

Putting the stylesheets at the top of your web page and moving the scripts to the bottom are only two of thirty four rules described in Best Practices for Speeding Up Your Website (by Yahoo). Following these two rules, however, can really decrease visible time of page rendering. I will present a simple solution to achieve this in symfony framework.

Looking at the website's source code

Most of the web programmers have some kind of deviation that tells them to look into the source code of the websites they visit. In many cases author planned to have nice indented output. In other cases author just didn't care.