Skip to content

Instantly share code, notes, and snippets.

View mbinna's full-sized avatar

Manuel Binna mbinna

View GitHub Profile
@mbinna
mbinna / mogenerator.sh
Last active October 13, 2015 03:58
Invoke mogenerator during Xcode build
# The approach used here is adopted from the following source:
# http://nsscreencast.com/episodes/12-importing-into-core-data
#
# Since version 1.27, mogenerator automatically uses the current version of the data model
MODELS_DIR="MyModels"
DATA_MODEL="${MODELS_DIR}/MOPIncrementalStoreModel.xcdatamodeld"
# Homebrew stores mogenerator in /usr/local/bin
PATH=/usr/local/bin:${PATH}
@mbinna
mbinna / UIViewController+MBSensitiveInformationInScreenshotPrevention.h
Created June 12, 2011 13:00
Prevent sensitive information from appearing in the screenshot that is automatically taken when the application transitions from the foreground to the background and vice-versa.
//
// UIViewController+MBSensitiveInformationInScreenshotPrevention.h
//
// Created by Manuel Binna on 05.05.11.
// Copyright 2011 Manuel Binna. All rights reserved.
//
@interface UIViewController (MBSensitiveInformationInScreenshotPrevention)
@mbinna
mbinna / .clang-format
Created February 18, 2014 12:43
Custom .clang-format
# Reference: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false