Skip to content

Instantly share code, notes, and snippets.

View marknorgren's full-sized avatar

Mark Norgren marknorgren

View GitHub Profile
@marknorgren
marknorgren / objc.cfg
Created October 16, 2012 13:40 — forked from tszming/objc.cfg
My uncrustify config file for objective-c
#
# uncrustify config file for objective-c and objective-c++
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE
@marknorgren
marknorgren / xcodeConditionalBreakpoint.m
Created November 30, 2012 15:05
XCode Conditional Breakpoint
// conditional breakpoint to stop when a property string equals another string
(BOOL)[myText.string isEqualToString:@"someString"]
+ (NSString *)timeIntervalToStringWithInterval:(NSTimeInterval)interval
{
NSString *retVal = @"At time of event";
if (interval == 0) return retVal;
int second = 1;
int minute = second*60;
int hour = minute*60;
int day = hour*24;
// interval can be before (negative) or after (positive)
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
@marknorgren
marknorgren / gist:5154097
Last active December 14, 2015 21:49
Garage Door Open/Close Notification
/**
* Garage Door Open/Close notification
*
* Author: [email protected]
* Date: 2013-03-09
*/
def preferences()
{
return [
/**
* Garage Door Open/Close notification
*
* Author: [email protected]
* Date: 2013-03-09
*/
def preferences()
{
return [
@marknorgren
marknorgren / fix-xcode
Last active December 23, 2015 09:59 — forked from rnapier/fix-xcode
#!/usr/bin/python
# fix-xcode
# Rob Napier <[email protected]>
# Updates - Mark Norgren <[email protected]>
# Script to link in all your old SDKs every time you upgrade Xcode
# Create a directory called /SDKs (or modify source_path).
# Under it, put all the platform directories:
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform
@marknorgren
marknorgren / _.md
Created September 20, 2013 16:11
reddit base
@marknorgren
marknorgren / _.md
Created September 20, 2013 16:11
reddit base
@marknorgren
marknorgren / _.md
Created September 20, 2013 16:17
reddit base