Tag Archives: snippets

Shell: Generate Git

A comprehensive script for Xcode projects that lets you generate .gitignore and .gitattributes in the directory of your choosing. Download You can grab the script here: https://gist.github.com/anjerodesu/5063843 Running the script Copy the script to your project folder. Open Terminal and run: cd path/to/your/project/ (if you’re not yet on your project’s directory) sh generate-git.sh AngeloAngelo Villegas … Continue reading Shell: Generate Git

Shell: Reindexing Spotlight on your Mac

Spotlight indexing can slow your machine if you have low memory. Doing it repeatedly may stop your machine from working. This problem is a common occurrence with Mac machines. As I am a Mac user, I wrote a simple shell script that will help your Spotlight to stop reindexing your installed drive(s). This Shell script … Continue reading Shell: Reindexing Spotlight on your Mac

Snippets: NSLog and Macros Tips and Tricks

Tricks Some NSLog tricks I’m using on my escapade. These snippets are preprocessor macros that will help your debugging moments easier if not a lot. ALog This snippet will log everything every time you use it in a line. It will display the method name, the line number and the argument you gave. #define ALog(fmt, … Continue reading Snippets: NSLog and Macros Tips and Tricks

Snippets: Set Network Activity Indicator On and Off

This little snippet will let you show the network activity indicator using ShowActivityIndicator(); and hide it with HideActivityIndicator();. #define ShowActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: YES]; #define HideActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: NO]; If you work with network in your app, then this little code will be an invaluable asset. This will save you a lot of retyping. … Continue reading Snippets: Set Network Activity Indicator On and Off