Fix casks with `depends_on` that reference pre-Mavericks

If you get an error of the type Error: Cask ‘hex-fiend-beta’ definition is invalid: invalid ‘depends_on macos’ value: “:lion”, where hex-fiend-beta can be any cask name, and :lion any macOS release name, run the following command: /usr/bin/find “$(brew –prefix)/Caskroom/”*’/.metadata’ -type f -name ‘*.rb’ -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe ‘s/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g’ This will remove all depends_on macos references […]

How to run VLC player as root user

Explanation: The initialization script check if the UID is equals to zero. Zero is reserved for the root user. Using sed to replace geteuid for getppid fools the initialization script because it is always > 0. While running the VLC as root is not recommended, it works. Be aware of the risks and obviously do not do it for production environments.