This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SKRequest * arequest = ( | |
[[SKReceiptRefreshRequest alloc] | |
initWithReceiptProperties:nil | |
] | |
); | |
[arequest | |
startWithCompletion:^(SKRequest *request, NSError *error) | |
{ | |
if( error ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SKRequest+Blocks.h" | |
#import <objc/runtime.h> | |
static char const * const completion_key = "completion"; | |
@implementation SKRequest (Blocks) | |
- (void) | |
request :(SKRequest *) request | |
didFailWithError:(NSError *) error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <StoreKit/StoreKit.h> | |
typedef void(^SKRequestCompletion)(SKRequest * request, NSError * error); | |
@interface SKRequest (Blocks) <SKRequestDelegate> | |
- (void) startWithCompletion:(SKRequestCompletion) completion; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <XCTest/XCTest.h> | |
#import <OCMock/OCMock.h> | |
typedef void(^MockBlock)(void); | |
@interface Action : NSObject | |
@property (nonatomic, strong) MockBlock action; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>FormatVersion</key> | |
<string>1.2</string> | |
<key>RunDestination</key> | |
<dict> | |
<key>Name</key> | |
<string>iPhone Retina (4-inch)</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OSStatus RenderToneWithState | |
( | |
void *inRefCon, | |
AudioUnitRenderActionFlags *ioActionFlags, | |
const AudioTimeStamp *inTimeStamp, | |
UInt32 inBusNumber, | |
UInt32 inNumberFrames, | |
AudioBufferList *ioData | |
) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct _WaveState { | |
double amplitude; | |
double increment; | |
double theta; | |
} WaveState; | |
void fillWaveSamples( WaveState * state, UInt32 number_of_samples, Float32 * buffer) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void sineWaveSamples( int num_of_samples, double *buffer) { | |
double frequency = 260; | |
double sample_rate = 8000; | |
double increment = 2.0 * M_PI * (frequency / sample_rate); | |
double amplitude = 0.25; | |
static double theta = 0; | |
for( UInt32 i = 0; i < num_of_samples; i++ ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.m | |
// GCD_SPIKE_2 | |
// | |
// Created by Steve Trewick on 29/05/2013. | |
// Copyright (c) 2013 Enigmatic Ape. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import <dispatch/dispatch.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Wheel Zoom", | |
"description": "Mouse Wheel Zooming.", | |
"version": "1.0", | |
"permissions": [ | |
"tabs", | |
"https://*/*", |