Developer Tools

Developer Tools

How To Comment Several Lines Quickly Using VIM

If you have to insert comment on several lines do you do manually insert the comment character in every line? Stop. Vim is a really good editor and has a nice feature to accomplish this quickly. Here are the steps:

  1. Enter visual blocking mode by pressing CTRL V (CTRL key and the lowercase v).
  2. Make your selection using motion keys(jklm, etc).
  3. Press I(uppercase I) to enter block insert mode.
  4. Press #, the comment character.
  5. Press Esc key. The comment character # will be inserted on each line the visual block selection.
Taxonomy upgrade extras: 

Changes In Bizsense

Bizsense is an open source CRM project which uses Zend Framework. The open source project was started by Binary Vibes about three years ago and was released under the GPL V3 license. Some of you might have noticed that I am no longer active in Binary Vibes.

I wanted Bizsense project development to continue to nourish, flourish and cherish. Therefore, there we did a few changes. Bizsense is now released under the new BSD license. Bizsense uses Google open source project hosting which offers issue tracker, Wiki and source control. Bizsense now uses Mercurial for source control. The documentation is published at docs.jubero.com. In order to contribute to Bizsense, signing a CLA is no longer required.

Here are the project links:

Installing Redmine With MySQL And Nginx On CentOS 6

Redmine is a software project management tool which has Wiki, issue tracer, source code browser and other cool features built in. If you want to install Redmine with MySQL and Nginx on CentOS 6, follow these steps.

I always use EPEL repository with CentOS. EPEL provides additional RPM packages. We can use Nginx and some Ruby gem packages from EPEL.

Enable EPEL:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Install required packages:

yum install nginx mysql-server ruby rubygem-rack rubygem-rake ruby-mysql

Redmine requires a Ruby gem called i18n. I couldn't find the RPM for i18n gem. I had to install i18n gem using the gem installer.

gem install -v=0.4.2 i18n

Start MySQL server:

/etc/init.d/mysqld start

Use the MySQL secure installation program:

mysql_secure_installation

Connect to the MySQL server as root:

mysql -u root -p

Create a MySQL database and user for Redmine:
mysql> CREATE DATABASE redmine character set utf8;
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'secret_password' WITH GRANT OPTION;

Writing A PHP Script To Send SVN Commit Changeset Email Notification

If you are a

  • PHP programmer looking to write a script to send changelog email notification when a commit is made to the SVN server
  • SVN server admin looking for a script to send changelog email notification when a commit is made

you have come to the right place.

For the impatient, the script is posted at the end of the article.

Before we delve into writing the script, let us summarize the environment.

  • We have our SVN project at the path /var/svn/myproject/
  • The project name is myproject

Exploring svnlook

Taxonomy upgrade extras: 

Generate Lines Of Code And Comment Statistics Using phploc

You have been writing a lot of PHP code and want to generate statistics about the number of comment and code lines in your application. Maybe you want to generate statistics about some PHP project. You can do it with just one command.

phploc helps you quickly generate numbers about the size of a PHP project.

You can install phploc from the PEAR installer. The PHP PEAR package itself is most likely available from your distribution vendor.

Taxonomy upgrade extras: 

Tip Of The Day: Avoid Forgetting Adding Files To SVN Repository

If you are using subversion (SVN) for your source code management you may have come across this situation.

  1. You add some files to your working copy
  2. You use the command 'svn add ' to add files to the be versioned
  3. You commit using the command 'svn commit -m "message"'
  4. When other users of your project update their working copy they find some files missing

You forgot to add certain files to the repository. It happens every now and then.

Taxonomy upgrade extras: 

Tip Of The Day : Use A Data Generator

While developing applications creating test data can be a tedious process to the developers. You don't have to do the same things like creating a user for testing over and over again.

Use a data generator. There are numerous tools freely available online that can provide the test data for you.

Taxonomy upgrade extras: