Skip to content

Instantly share code, notes, and snippets.

View hhartz's full-sized avatar

Henrik Hartz hhartz

View GitHub Profile
import Qt 4.6
Rectangle {
id: Page
width: 960; height: 720
color: "#201F25"
Rectangle {
@hhartz
hhartz / gist:4044503
Last active October 12, 2015 14:58
Manual tracking of retain/release and subsequent retainCount
- (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
@hhartz
hhartz / ViewController.swift
Created January 23, 2017 08:39
Mapbox offline pack resume bug
// 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
@hhartz
hhartz / keybase.md
Created March 16, 2017 07:30
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: