Archive for October, 2007

Script for adding new MySQL database and user easily

Saturday, October 20th, 2007

At my company we have lots of MySQL databases(usually one for each virtual host) and each database has its unique user. Adding a new database and a user with proper permissions can be quite tedious, that’s why I hacked up the following script which saves some of my precious time ;)


A couple of nginx utility scripts

Saturday, October 20th, 2007

In my previous nginx related post I promised to show a couple of utility scripts we use to simplify managing of multiple virtual hosts both under Apache and nginx. Well, here they come ;)


lmbActiveRecord’s late static binding emulation

Monday, October 15th, 2007

I was quite inspired on having heard that the late static binding(LSB) patch will make it into PHP-5.3. In short, it should allow to know the name of a class which invoked the parent’s static class method.


vim automatic upward search for make and scons build scripts

Monday, October 8th, 2007

If you happen to have your vim configured to change the current directory to the one where the edited file is stored(e.g. “autocmd BufEnter * :cd %:p:h”) you might find the following vim script handy.

Syncman - projects remote deployment for my grandma

Sunday, October 7th, 2007

Syncman Logo

If you’re running a company mainly occupied with development of lots of web sites ranging from tiny promo sites to large portals you most probably should face deployment headaches some day.

How do folks usually deploy their remote applications? Some use manual deployment via FTP, others prefer using rsync or unison, some brave souls deploy simply by updating the project’s Subversion working copy on the remote server, Rails fans usually stick with Capistrano, some smart fellows are said to be using complicated cfengine, etc.

At my company we were not happy with any mentioned above methods of remote project deployment due to either lack of functionality or unnecessary complexity. We simply needed a tool which could use non-technical personnel: managers, web-designers, etc. That’s why we hacked our own simple utility - meet Syncman ;)