Skip to content

Instantly share code, notes, and snippets.

@mattyohe
mattyohe / .travis.yml
Created October 29, 2015 04:04 — forked from nlutsenko/.travis.yml
Make Travis-CI run your tests using different versions of Xcode
os: osx
matrix:
include:
- osx_image: xcode7.0
- osx_image: xcode7.1
- osx_image: xcode7.2b1
@mattyohe
mattyohe / PSPDFUIKitMainThreadGuard.m
Created September 25, 2015 19:36 — forked from steipete/PSPDFUIKitMainThreadGuard.m
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
#import <objc/runtime.h>
#import <objc/message.h>
// Compile-time selector checks.

Before you start

Make sure that you have the latest version of Xcode installed from the Mac App Store, and that you have the command line tools installed. To install the command line tools, open Xcode, click Xcode->Preferences->Downloads->Command Line Tools

Install brew if needed.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Install ruby-build.

brew install ruby-build

//
// main.c
// CopyList
//
// Created by Joshua Weinberg on 3/25/13.
// Copyright (c) 2013 Joshua Weinberg. All rights reserved.
//
#include <iostream>
#include <map>
From: http://snipt.net/yonishin/about-xcode-4-project-template
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates
Examples:
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate
@mattyohe
mattyohe / floatsign.sh
Created October 12, 2012 20:07
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Extended by Ronan O Ciosoig January 2012
#
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
@mattyohe
mattyohe / Evil.m
Created February 2, 2012 01:47 — forked from PsychoH13/Evil.m
Debauching ObjC's dot-syntax and blocks in ObjC
#import <Foundation/Foundation.h>
@interface NSString (Evil)
@property(assign, setter=initWithString:) NSString *initWithString;
@property(assign, readonly) NSString *test;
@property(assign, readonly) NSArray *(^split)(NSString *);
@end
int main(int argc, char *argv[])
{