Skip to content

Instantly share code, notes, and snippets.

Avatar

Henrik Hartz hhartz

View GitHub Profile
View arswall.qml
import Qt 4.6
Rectangle {
id: Page
width: 960; height: 720
color: "#201F25"
Rectangle {
@hhartz
hhartz / gist:4044503
Last active Oct 12, 2015
Manual tracking of retain/release and subsequent retainCount
View gist:4044503
- (NSString*) filteredCallstackSymbol
{
NSArray *callStackSymbols = [NSThread callStackSymbols];
NSPredicate *filter = [NSPredicate predicateWithFormat:@"self contains 'Stay'"]; // filter for 'ClassPrefix'
NSArray *filtered = [callStackSymbols filteredArrayUsingPredicate:filter];
NSString *closestSymbol = [filtered objectAtIndex:(filtered.count>2)? 2 : 1];
return closestSymbol;
}
-(id) retain
View keybase.md

Keybase proof

I hereby claim:

  • I am hhartz on github.
  • I am hhartz (https://keybase.io/hhartz) on keybase.
  • I have a public key ASCzYlGK6heUXIMUhktq7hxI5AYqRYQe4vhpS3F2skQ9oAo

To claim this, I am signing this object:

@hhartz
hhartz / ViewController.swift
Created Jan 23, 2017
Mapbox offline pack resume bug
View ViewController.swift
// Source code for mapbox offline pack resume bug
//
// Adapted from https://www.mapbox.com/ios-sdk/examples/offline-pack/.
// To download, use the shake gesture (ctrl-cmd-Z), and kill the app. When the app is resumed
// it will find a partial pack and resume it. Notice how the network and disk activity shows
// that a download is indeed ocurring, while there are no notifications posted on progress.
import UIKit
import Mapbox