Search This Blog


February 14, 2015

How to check whether a string contains a substring in Ruby?

Typically, one would expect (at least I end-up trying this first, almost everytime) a method by name contains? to be available for use. Unfortunately, it isn't present.

February 1, 2015

Repair Homebrew Permissions after installing as root

If you have run brew as root or with sudo prefix, later updates to brew fail to change the git versioning. Additionally, the directory permissions to /usr/local and /Library/Caches/Homebrew gets restricted to root only.

To correct this all you need is execute the below command in your terminal:

# Reset the permissions of /usr/local and Homebrew's caches to the current user:
          $ sudo chown -R $USER:admin /usr/local /Library/Caches/Homebrew          

You now should have got your freedom back ;)

September 15, 2014

Prune Run Configuration Meta-data in Eclipse

Sometimes Eclipse IDE fails to clear or prune stale meta-data. One such instance that you'd come across is the stale run configuration for an (Android) application.

September 3, 2014

Batch convert media files using ffmpeg and ruby

So you have those old videos taken in your handy-cam that you'd want to convert to mp4 for better compatibility across devices and less storage footprint? And you want to batch convert all these videos?

September 1, 2014

Automate title metadata tag to its file name

Don't see media titles in your playlist of your media player. Chances are the title meta-data isn't set for those files. This blog post is a recipe to fix this situation, assuming you're a developer :)