Skip to content

Instantly share code, notes, and snippets.

View oks's full-sized avatar
🎯
Focusing

Oksana Kovalchuk oks

🎯
Focusing
View GitHub Profile
UTReportType b = UTReportTypeFull;
char iss[] = {'i', 's', 's', 'u', 'e',0};
char fdback[] = {'f', 'e', 'e', 'd', 'b', 'a', 'c', 'k', 0};
if([str isEqualToString:[NSString stringWithUTF8String:iss]])
b = UTReportTypeIssue;
else if([str isEqualToString:[NSString stringWithUTF8String:fdback]])
b = UTReportTypeBetaTesterFeedback;
- (id)init
{
if (self = [super init])
{
[self addObserver:self forKeyPath:@"isDirty" options:0 context:NULL];
}
return self;
}
- (void)dealloc
@oks
oks / Breakpoints_v2.xcbkptlist
Created March 11, 2016 02:56 — forked from raven/Breakpoints_v2.xcbkptlist
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@oks
oks / OrderedCollectionSpec
Created March 5, 2016 21:55 — forked from noahmiller/OrderedCollectionSpec
An example of using shared Specta behavior
SharedExamplesBegin(OrderedCollectionBehavior)
// A set of shared test cases are defined here under the key name
// "an ordered collection".
//
// The dictionary param is the only means of providing data from
// the shared examples caller to the set of shared examples.
// In this case pass in the collection class to be tested.
sharedExamplesFor(@"an ordered collection", ^(NSDictionary* data)
{
@oks
oks / ocmock-cheatsheet.m
Last active May 11, 2023 14:07 — forked from kharmabum/ocmock-cheatsheet.m
OCMock cheatsheet
/*----------------------------------------------------*/
#pragma mark - XCTAsserts
/*----------------------------------------------------*/
XCTAssert(expression, format...);
XCTAssertTrue(expression, format...);
XCTAssertFalse(expression, format...);
XCTAssertEqual(expression1, expression2, format...);
XCTAssertNotEqual(expression1, expression2, format...);
XCTAssertNil(expression, format...);
//
// LogEntriesLogger.h
// lcinventories
//
// Created by Chris Richards on 17/11/2014.
// Copyright (c) 2014 Yellow Feather Ltd. All rights reserved.
//
#import "DDLog.h"
- (RACSignal *)endlessPollingWithSuccessDelay:(NSTimeInterval)successDelay failureDelay:(NSTimeInterval)failureDelay {
return [[[
// After completion - Wait for successDelay
[self concat:[[RACSignal empty] delay:successDelay]]
// After failure - Wait for failure delay
catchTo:[[RACSignal empty] delay:failureDelay]]
// Resubscribe
@oks
oks / TableView
Created November 17, 2014 15:48
Correct handling buttons inside cells
- (instancetype)init
{
self = [super init];
if (self)
{
self.delaysContentTouches = NO;
}
return self;
}
@oks
oks / countries.son
Created November 17, 2014 14:53
All countries with phone country codes
[{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375","code":"BY"},{"name":"Belgium","dial_code":"+32",
@oks
oks / mogend.sh
Created November 17, 2014 14:50
mogend.sh
#!/bin/sh
# mogend.sh
# CtrlDo
#
# Created by Oksana Kovalchuk on 5/17/14.
# Copyright (c) 2014 ANODA. All rights reserved.
#TODO: Change this to the name of custom ManagedObject base class (if applicable)
# If no custom MO class is required, remove the "--base-class $baseClass" parameter from mogenerator call