How to change Java Version/JAVA_HOME for Ant?

I wrote this earlier on a Github gist, but putting it here for a consolidated reference. Want to change Java Version/JAVA_HOME for Ant builds? Open ~/.antrc file by running vim ~/.antrc Add JAVACMD=<NEW_JAVA_HOME>/bin/java and save The Ant wrapper script for Unix will source (read and evaluate) the file ~/.antrc before it does anything. On Windows, the Ant wrapper batch-file invokes %HOME%\antrc_pre.bat at the start and %HOME%\antrc_post.bat at the end. You can use these files, for example, to set/unset environment variables that should only be visible during the execution of Ant. ...

June 15, 2020 · 1 min

How To Implement Two Way SSL With Nginx

A couple of weeks ago, I was tasked with figuring out a way to enable two way SSL. I am a programmer, and have had only a limited experience with networking concepts like SSL/TLS in my short career. So I turned up blank on how I could make it possible. Moreover, the terminology you’d find online is not uniform. From a programming point of view, the term “Two way SSL” led me to limited results, and I soon realized that other communities have different terminology. For example the “Two way SSL” is also known as “Mutual TLS” or “mTLS” or “Client Certificate Authentication” in Cloud/DevOps communitites. This makes finding the right resources online more difficult. ...

June 13, 2020 · 14 min

How to achieve a 50% reduction in Redis memory usage

Yes, you read that right. To give you some context, some time ago, our (my org’s) Redis usage was un-tracked – meaning we didn’t know why our Redis memory was being occupied as much as it was. Our 2.5GB of Redis ElastiCache was almost close to being full, and if it somehow reached its limit, our system would start to fail. Though there were fallbacks in place, Redis could turn out to be a bottle-neck. ...

May 10, 2020 · 11 min

Using IntelliJ IDEA Live Templates

IntelliJ IDEA is an awesome IDE, and a lesser known and used feature is Live Templates. Live Templates enable you to use code snippets with just a few keystrokes. A lot of great ones are provided out-of-the-box by IntelliJ. You can view them using the shortcut press Double Shift and then typing Live Templates. The shortcut works regardless of the OS you’re currently using (and I am too lazy to specify OS specific menus). ...

September 1, 2019 · 3 min