Skip to content

Instantly share code, notes, and snippets.

View quellish's full-sized avatar

Dan quellish

View GitHub Profile
@quellish
quellish / FailingSilentNotificationWithAlert.md
Created October 3, 2018 22:39
Mixing content-available and alert
{
    "aps": {
        "alert": {
            "body": "Test message",
            "title": "Optional title",
            "subtitle": "Optional subtitle"
        },
        "content-available": 1
 }
@quellish
quellish / CocoapodsToSubmodules.md
Created June 28, 2018 07:14
CocoaPods conversion to Submodules Specs
  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:

@quellish
quellish / FriendsSpecs.md
Created June 28, 2018 07:13
Friends Specs
@quellish
quellish / predicatedistanceToLocationfromLocation.m
Created February 1, 2016 20:29
NSPredicate distanceToLocation:fromLocation
predicate = [NSPredicate predicateWithFormat:@"distanceToLocation:fromLocation:(%@, %@) =< %@",
toLocation,
fromLocation,
expectedDistance
];
@quellish
quellish / distanceToLocationfromLocation.m
Created February 1, 2016 20:26
NSExpression distanceToLocation:fromLocation:
expression = [NSExpression expressionForFunction:@"distanceToLocation:fromLocation:"
arguments:@[
[NSExpression expressionForConstantValue:to ],
[NSExpression expressionForConstantValue:from ]
]
];
result = (NSNumber *)[expression expressionValueWithObject:nil context:nil];
@quellish
quellish / zomg.swift
Created January 27, 2016 01:04
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);
}
@quellish
quellish / ProbedURLCache2.m
Created January 26, 2016 23:39
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;
@quellish
quellish / ProbedURLCache1.m
Created January 26, 2016 23:38
ProbedURLCache1.m
#import "ProbedURLCache.h"
@implementation ProbedURLCache
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request {
return [super cachedResponseForRequest:request];
}
@end
@quellish
quellish / http_cache2.d
Created January 26, 2016 23:37
http_cache2.d
provider http_cache {
probe response_from_cache(char *, char *, int);
};
@quellish
quellish / http_cache1.d
Created January 26, 2016 23:36
http_cache1.d
provider http_cache {
};