This script is for experimental purposes only. Use of this code in production environment is highly discouraged. This is for small code hack for retrieving object manager. While in Magento2, retrieving object manager is highly discouraged.
I am open to any suggestion for any modification or enhancements in this script. Please ping back for pull requests with explanation and would be appreciated.