Category: Programming

Gettext translations

Gettext is a great way to localize and internationalize (simply put, to translate) your (web)applications. It’s especially useful when you’re building a multi-language application because you can separate the code from the translation process effectively. all strings that need to

Tagged with: , ,

Yii CRUD generator and plural forms

Yii framework has a really nice CRUD generator that can speed up building back-end applications, which tend to be rather similar and therefore repetitive. If you prepare reasonable taxonomy of the underlying database tables, it also manages the page headers

Tagged with: , ,

Check the WordPress version of several sites at once

I’ve got this blog of mine where I log in every now and then, so whenever there is a new version of WordPress, I see the update reminder message. There is, however, over a dozen other blogs under my wings

Tagged with: , ,

Grep result to a shell variable – no line breaks

There was this website containing regularly updated content I wanted to follow. Unfortunately, they had no RSS feed available and I didn’t feel like checking on the website every now and then. Also, what I needed was just the posts

Tagged with: , ,

Subdirectory Checkout with git sparse-checkout

It’s very convenient, even necessary, to use a version control system, e.g. CVS or Git. One can go back in history and easily trace the changes (especially) when something goes wrong. Git, being a distributed system, can be used to

Tagged with:

Git – show all files modified between two commits

It’s always best to commit your work only once it’s done. Sometimes the changes span over days or weeks and this is where stashing comes useful. Sometimes, however, I start work at the office and then I want to go

Python os.sytem() and Windows Program Files directory

I ran across a problem when trying to run a program located in “Program Files” directory from within a Python application using os.system(). It was obvious that the problem was caused by the space character in the name of the

Tagged with: ,

MySql – get names of columns and put them in an array

Sometimes I need to get all the names of the columns in an sql table, most often to use the names of the columns as names of variables as it’s easier to use than simple $row[1], $row[2], etc. Let’s take

Tagged with: ,

Kohana php framework – part 1.

Learning a framework seems to be inevitable.

Tagged with: , ,