Quick Tip

Quick Tip

Mercurial - How To View A File Exactly Like It Appeared On A Particular Date

Here's a quick tip for Mercurial users.

Travel back in time and see how the file appeared. :)

hg cat --rev "date('2011-05-03')" controllers/crons.py

Let's break it down.

hg cat is the command we use to print the given revision of file.

hg cat --rev 10885:ae28ee103fed controller/crons.py

would print the file for the revision 0885:ae28ee103fed.

Mercurial supports a functional language for selecting a set of revisions. To know more about it try:

hg help revsets

In our solution:

Taxonomy upgrade extras: 

Tip Of The Day : Add The Show Desktop Widget To The Panel And Configure Keyboard Shortcut To Minimize All Windows - KDE 4.3.3

How to configure keyboard short cut to minimze all windows on KDE 4.3.3 on Fedora

Having the Show Desktop button on the panel is something everyone would want. If you are unable to find the settings follow the instructions below.

1. Install the kdeplasma-addons package.

# yum install kdeplasma-addons -y

2. Add the Show Desktop widget to the panel.

  • Click the Cashew button on the panel - the rightmost corner button
  • Click Add Widgets
  • Click Show Desktop
  • Click Add Widget
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: 

Tip Of The Day : Use dict

Have you fallen in love with the command line? Do you use a graphical browser to visit dictionary sites like wiktionary.org?

Use dictd.

What does dictd do?

[sudheer@localhost ~]$ yum info dictd
Loaded plugins: fastestmirror, refresh-packagekit
Installed Packages
Name       : dictd
Arch       : i386
Version    : 1.10.11
Release    : 3
Size       : 728 k
Repo       : installed
Summary    : DICT protocol (RFC 2229) command-line client
URL        : http://www.dict.org/
License    : GPL+ and zlib and MIT
Taxonomy upgrade extras: 

Use Okular To View PDF Documents

Ever since I discovered Okular, a universal document viewer for KDE 4, I haven't used another PDF document reader. I just love the KDE user interface. You should also try it. I'm sure you will like it.

Lately, I have been working on a web application that generates PDF quotes on the fly. While writing the PDF document generator script, I have to run the script and see how the document formatting has appeared. With Okular, I open the document only once. Upon each successive write operation to the PDF file, Okular refreshes the document. How cool.

Taxonomy upgrade extras: