Ayush's Blog

  • Bash Too Many Arguments

    if test ! -f $path The above script would create bash warnings for you like test: too many arguments The problem here is that the path contains spaces in it, and thus the test gets “more than one arguments”. The solution for the above problem is a pretty simple one,...

  • Upload Gists From Terminal

    Create Github gists from terminal. Use Homebrew to install gist. brew install gist gist --login to give OAuth access to the application so that it can create gists on your behalf. Otherwise it creates anonymous gists. Now read the documentation via gist -h and use it according to what you...

  • Notes From Wwdc Extensions Talk

    separate target Needs different entitlement isolated address space executes independantly Frameworks - encrypted Min deployment target to be ios 8 :( App links to framework - change all extensions in a framework, not changes NS_EXTENSION_UNAVAILABLE_IOS Sharing data - separate containers shared container Extension and App can be running simultaenously. Synchronize...

  • Helper Script To Create Post Template For Jekyll Blogs

    It has been tedious to name a Jekyll post file with the weird format. So, I created a python script to solve this. :) The gist tries to solve not only the naming problem, but also adds helpers to create the required front-matter. Also, I have added a small wrapper...

  • Boolean In Objective C

    This post is inspired from the eye-opener article -> bignerdranch. I always had this question, “Why does Objective-C need a BOOL when C gives it a free bool, which effectively works the same?”. Well, I couldn’t have been more wrong. BOOL and bool are entirely different beasts. BOOL is a...