Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan quellish

View GitHub Profile
@quellish
quellish / FailingSilentNotificationWithAlert.md
Created Oct 3, 2018
Mixing content-available and alert
View FailingSilentNotificationWithAlert.md
{
    "aps": {
        "alert": {
            "body": "Test message",
            "title": "Optional title",
            "subtitle": "Optional subtitle"
        },
        "content-available": 1
    }
@quellish
quellish / CocoapodsToSubmodules.md
Created Jun 28, 2018
CocoaPods conversion to Submodules Specs
View CocoapodsToSubmodules.md
  1. WordPress-iOS project must build and run all targets correctly.
  2. All dependencies must be using the version specified in the original Podfile.
  3. All work must be based on WordPress-iOS repository version 72862f6651bf5dbe77235e836607bc74717f7d21.

The WordPress-iOS app repository is: https://github.com/wordpress-mobile/WordPress-iOS

Fork or clone and create a branch for this work.

Go through the existing Podfile. For each pod listed:

View FriendsSpecs.md
@quellish
quellish / predicatedistanceToLocationfromLocation.m
Created Feb 1, 2016
NSPredicate distanceToLocation:fromLocation
View predicatedistanceToLocationfromLocation.m
predicate = [NSPredicate predicateWithFormat:@"distanceToLocation:fromLocation:(%@, %@) =< %@",
toLocation,
fromLocation,
expectedDistance
];
@quellish
quellish / distanceToLocationfromLocation.m
Created Feb 1, 2016
NSExpression distanceToLocation:fromLocation:
View distanceToLocationfromLocation.m
expression = [NSExpression expressionForFunction:@"distanceToLocation:fromLocation:"
arguments:@[
[NSExpression expressionForConstantValue:to ],
[NSExpression expressionForConstantValue:from ]
]
];
result = (NSNumber *)[expression expressionValueWithObject:nil context:nil];
View zomg.swift
if (__dtrace_isenabled$http_cache$response_from_cache$v1() != 0){
__dtrace_probe$http_cache$response_host_uri_status$v1$63686172202a$63686172202a$696e74(host.UTF8String, path.UTF8String, cached);
}
View ProbedURLCache2.m
#import "ProbedURLCache.h"
#import "http_cache.h"
@implementation ProbedURLCache
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request {
NSCachedURLResponse *result = nil;
int cached = 0;
result = [super cachedResponseForRequest:request];
if (result != nil){
cached = 1;
View ProbedURLCache1.m
#import "ProbedURLCache.h"
@implementation ProbedURLCache
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request {
return [super cachedResponseForRequest:request];
}
@end
View http_cache2.d
provider http_cache {
probe response_from_cache(char *, char *, int);
};
View http_cache1.d
provider http_cache {
};
You can’t perform that action at this time.