Sunday, April 7, 2013

BASH IO Redirection

In bash, by default, only stdout gets redirected to a file when you use the ">" operator.

To redirect stderr to a file, use the "2>" operator.

To redirect both, use "&>"

Reference:http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/

Git Undo Staging a File for Commit

If a file has already been staged for commit i.e. via the "git add" command, use the following command to unstage the file:

git reset HEAD <filename>

Monday, April 1, 2013

The "spi" Package in Java Projects

It's quite common to find a package called "spi" in Java projects.

Here's an explanation of what it means and what it's for: