Friday, September 27, 2013

How to cache your git credentials

The following command tells git to cache your password for 5 minutes:
git config --global credential.helper 'cache --timeout=300'
See also http://git-scm.com/docs/git-credential-cache.


https://confluence.atlassian.com/display/STASH/Permanently+authenticating+with+Git+repositories

OS X

Follow these steps to use Git with credential caching on OS X:
  1. Download the binary git-credential-osxkeychain.
  2. Run the command below to ensure the binary is executable:
    chmod a+x git-credential-osxkeychain
  3. Put it in the directory /usr/local/bin.
  4. Run the command below:
    git config --global credential.helper osxkeychain

Monday, September 2, 2013

Use avro-tools to inspect avro files in hdfs

Since version 1.7.5 avro-tools include support for hdfs tools. To read an avro file in hdfs use the following:
hadoop jar avro-tools-1.7.5.jar  tojson hdfs://<hostname>:/path/to/file.avro | less