How to ignore files and directories in SVN

It is easy to ignore files and directories in Git or Mercurial. Ignore files can be maintained at both the user and repository levels. Git or Mercurial automatically ignore the files and directories that match the patterns listed in these ignore files.

Being a version control system from an older era, Subversion does not have this simple method of ignore.

  • In SVN, ignoring a file or directory is a property that can be set at a specific directory in a repository.

For example, to ignore build subdirectory and *.tmp files:

$ svn propset svn:ignore build .
$ svn propset svn:ignore *.tmp .

Note that both these commands set ignore properties for the current directory .

  • To set an ignore property recursively to all subdirectories in a repository, go to the repository root directory and issue this:
$ svn propset svn:ignore -R *.tmp .
  • Thankfully, you can use an ignore file containing ignore patterns, one per line, as input:
$ svn propset svn:ignore -R -F ~/.svnignore .

Note the difference with Git or Mercurial. You have to manually set this ignore property on every directory. The ignore file we created is for our convenience. If you create a new subdirectory anywhere in this repository, the property needs to be applied again on it.

  • Remember to commit after setting the ignore property.

Tried with: Subversion 1.8.8 and Ubuntu 14.04

Easy Align plugin for Vim


Easy Align is a plugin for Vim that makes it easy to align your code along certain whitespace or characters. Unlike the Tabular plugin, Easy Align is actually easy to use, not requiring you to create and recall esoteric-looking arguments.

Here are few examples of how I use it:

  • To align a block of assignment statements in C++, I visually block it and use the command: EasyAlign=

  • To align a block of function calls in C++ along their multiple comma characters: EasyAlign*,

  • To align a block of function parameters, one on each line: EasyAlign-\

The logic behind these commands is straightforward and is explained in the table of examples on the plugin’s Github page.

Tried with: Vim 7.4 and Ubuntu 14.04

Alternate Files plugin for Vim

The Alternate Files plugin for Vim is simply called A.vim. It does a single, but very useful job for C and C++ files: it allows you to switch or alternate back and forth between source and header files.

  • If you are in foo.cpp source file and you type the command :A, Vim opens the corresponding foo.h header file. Vice versa.

Tried with: Vim 7.4 and Ubuntu 14.04

How to extract images from PDF

PDF files can have images embedded in them. These images can be extracted easily using the pdfimages tool from the poppler-utils package.

  • Installation is easy:
$ sudo apt install poppler-utils
  • To list the details of images embedded in a PDF file:
$ pdfimages -list foo.pdf
page   num  type   width height color comp bpc  enc interp  object ID
   1     0 image      80   100  icc     3   8  image  yes       11  0
   1     1 smask      80   100  gray    1   8  image  yes       11  0
   1     2 image      80   100  icc     3   8  image  yes       13  0
   1     3 smask      80   100  gray    1   8  image  yes       13  0
   1     4 image      80   100  icc     3   8  image  yes       15  0
   1     5 smask      80   100  gray    1   8  image  yes       15  0
   1     6 image      80   100  icc     3   8  image  yes       17  0
  • To extract the images embedded in a PDF file provide a prefix for the extracted image filenames:
$ pdfimages foo.pdf foo_img

$ ls foo_img*

Tried with: PopplerUtils 0.24.5 and Ubuntu 14.04

Classic Calculator app for Android


The unique selling point of the Classic Calculator app for Android is that it provides the actual UI of several famous and classic calculators. It shows an actual photo of the classic calculator model as the UI. This seems a bit tacky, but is quite functional once you start using it.

The Andromeda skin in this app is exactly the first scientific calculator I ever used. It was a clone of an older Casio calculator built and sold by Ajanta in India. Money was tight and I had bought this instead of the Casio calculators which everyone else had since it was almost half priced. The buttons were small and shaky, but it got the job done for several years. After I lost it, I bought a more contemporary Casio scientific calculator, which appears in this app as the Pegasus skin. I was quite delighted to discover both of the calculators I used in this app.

Note that the app is very heavy, it takes a while to load up. It shows ads, in fact your first click after loading the app will display an ad. So, I can only recommend this app for only those people who really miss a particular calculator which is available in this app as a skin.

Tried with: Classic Calculator 1.1.95, Android 5.0.2 (Lollipop) and Moto G 2nd Gen (XT1098)

PowerCalc app for Android


PowerCalc is an excellent scientific calculator app for Android. It retains the simplicity and familiarity of RealCalc‘s UI while having lots more calculation buttons. The equation editor can handle brackets nicely, the display is multi-line showing both the equation and its result and there is even history. If you use a scientific calculator every day, then I recommend this over the simpler RealCalc.

Tried with: PowerCalc 1.6.2, Android 5.0.2 (Lollipop) and Moto G 2nd Gen (XT1068)

RealCalc Scientific Calculator app for Android


RealCalc Scientific Calculator is my favorite scientific calculator app for Android. The UI is beautiful and mimics most of the classic scientific calculators. The app is light and loads up quickly. There are a few settings that can be adjusted. This is a free app, but there is a Pro version with more customizations which is a paid app. However, the app is not naggy about the upgrade and does not show any ads either.

Tried with: RealCalc Scientific Calculator 2.0.3, Android 5.0.2 (Lollipop) and Moto G 2nd Gen (XT1068)