Skip to content

Instantly share code, notes, and snippets.

View kdbdallas's full-sized avatar

kdbdallas kdbdallas

View GitHub Profile
@kdbdallas
kdbdallas / UIMainThreadGuard.m
Last active August 29, 2015 14:01 — forked from steipete/PSPDFUIKitMainThreadGuard.m
iOS: Find UI calls on background threads
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2013 Peter Steinberger. 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.
@kdbdallas
kdbdallas / AppKitMainThreadGuard.m
Last active August 29, 2015 14:01 — forked from andrewmichaelson/PSPDFUIKitMainThreadGuard.m
Mac: Find UI calls on background threads
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2013 Peter Steinberger. 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>
#import <Foundation/Foundation.h>
@kdbdallas
kdbdallas / RevealNoCode.md
Last active August 29, 2015 13:57 — forked from raven/Breakpoints_v2.xcbkptlist
Reveal available for all of your projects, without touching any source code

The laziest way to have Reveal available for all of your projects, without touching any source code

With the power of Xcode's symbolic User breakpoints, you can easily toggle on and off dynamically linking Reveal into your app.

The lazy way

Warning: This does not affect your current project or workspace breakpoints but will blast away any User breakpoints.

  1. Quit Xcode, and in terminal:
UI- and App Frameworks Evangelist - Jake Behrens, [email protected], twitter: @Behrens
- What's new in Cocoa
- Accessibility in iOS
- Building User Interfaces for iOS 7
- Getting Started with UIKit Dynamics
- What's new in Cocoa Touch
- What's New With Multitasking
- Best Practices for Cocoa Animation
- Improving Power Efficiency with App Nap
- Introducing Text Kit
//
// RVNReceiptValidation.m
//
// Created by Satoshi Numata on 12/06/30.
// Copyright (c) 2012 Sazameki and Satoshi Numata, Ph.D. All rights reserved.
//
// This sample shows how to write the Mac App Store receipt validation code.
// Replace kRVNBundleID and kRVNBundleVersion with your own ones.
//
// This sample is provided because the coding sample found in "Validating Mac App Store Receipts"
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'