Manish Kapoor

Git

Finding authors of all remote branches in a git repository.

Git is a widely adopted Version Control System known for its branching support. Recently I was required to find out all the remote branches with their author names. Upon browsing over the web I found that command git-for-each-ref can help me. Here is how I combined it with grep to get the desired output: [code] git for-each-ref...

16-Jun-2015

Database, MongoDB

A use case and implementation of MongoDB Aggregation queries.

In any DBMS, aggregations are operations that process data records and return computed results. MongoDB provides a rich set of aggregation operations that examine and perform calculations on the data sets. Running data aggregation on the mongod instance simplifies application code and limits resource requirements. In my current...

08-Jun-2015

Grails

How to validate XML file against XSD schema and list all validation errors

Recently in my project, I had a requirement to validate XML file against XSD schema file and list all validation errors. XSD (XML Schema Definition) is a way to specify metadata (schema, constraints, etc) about the xml data. To validate an XML file against an XSD file, we normally do something like this: [groovy] import...

05-Jun-2014