Buy @ Amazon

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 ;)