Skip to content

Instantly share code, notes, and snippets.

View malshash's full-sized avatar

Chris Long malshash

View GitHub Profile

Keybase proof

I hereby claim:

  • I am abathingchris on github.
  • I am chrislong (https://keybase.io/chrislong) on keybase.
  • I have a public key ASAMLVX55WeoyBs7fw15OhBSEDoj8R1owsW78pnwH2PAUQo

To claim this, I am signing this object:

func fetchData(completion: @escaping () -> Void) {
// RestClientSuccessBlock onSuccess = ^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
// NSDictionary *resultDict = [mappingResult dictionary];
//
// dispatch_async(dispatch_get_main_queue(), ^{
//
// [self handleResponse:resultDict error:nil];
//
// if(completion) {
@malshash
malshash / reststuff.m
Last active February 12, 2017 01:56
restkit example
typedef void (^RestClientSuccessBlock)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult);
typedef void (^RestClientFailureBlock)(RKObjectRequestOperation *operation, NSError *error);
#pragma mark - Network Accessibility Code
- (void)fetchData:(void(^)(void))completion {
[self prepareForFetch];
RestClientSuccessBlock onSuccess = ^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
@malshash
malshash / reststuff.m
Created February 12, 2017 01:53
restkit example
#pragma mark - Network Accessibility Code
- (void)fetchData:(void(^)(void))completion {
[self prepareForFetch];
RestClientSuccessBlock onSuccess = ^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
NSDictionary *resultDict = [mappingResult dictionary];
dispatch_async(dispatch_get_main_queue(), ^{
@malshash
malshash / operatorCharacters.swift
Created December 1, 2015 21:29 — forked from natecook1000/operatorCharacters.swift
Allowed characters for Swift operators
import Foundation
extension UnicodeScalar : ForwardIndexType {
public func successor() -> UnicodeScalar {
return UnicodeScalar(value + 1)
}
}
var operatorHeads: [UnicodeScalar] = Array("=-+!*%<>&|^~?".unicodeScalars)
operatorHeads += Array("\u{00A1}" ... "\u{00A7}")
@malshash
malshash / gist:10153233
Created April 8, 2014 16:38
persistentStore
// Returns the persistent store coordinator for the application.
// If the coordinator doesn't already exist, it is created and the application's store added to it.
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (_persistentStoreCoordinator != nil) {
return _persistentStoreCoordinator;
}
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"test.sqlite"];
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@malshash
malshash / blog
Created March 26, 2014 01:32
blog
- [ ] [nomad cli](http://nomad-cli.com/)