Skip to content

Instantly share code, notes, and snippets.

View qmchenry's full-sized avatar

Quinn McHenry qmchenry

View GitHub Profile
@qmchenry
qmchenry / gist:20676f5718697b4c78ce
Created November 19, 2014 21:27
kFullScreenDivisor = 4
2014-11-19 16:27:03.477 PrincessCelebrate-iOS[2313:169387] *** [CelebrateCurtain::update] Used: 49.933594 MB out of 502.984375 MB (9.927464%)
2014-11-19 16:27:03.499 PrincessCelebrate-iOS[2313:169387] *** [CelebrateCurtain::update] Used: 49.933594 MB out of 502.984375 MB (9.927464%)
2014-11-19 16:27:03.514 PrincessCelebrate-iOS[2313:169387] *** [CelebrateCurtain::update] Used: 49.933594 MB out of 502.984375 MB (9.927464%)
2014-11-19 16:27:03.569 PrincessCelebrate-iOS[2313:169682] Used: 48.062500 MB out of 502.984375 MB (9.555466%)
Cocos2d: cocos2d: CCSpriteFrameCache: Trying to use file /private/var/mobile/Containers/Bundle/Application/2C8B6C10-E70B-460E-9820-66E8661B11AD/PrincessCelebrate-iOS.app/Shared/carousel/name_banners.png as texture
2014-11-19 16:27:04.075 PrincessCelebrate-iOS[2313:169682] Used: 53.699219 MB out of 502.984375 MB (10.676121%)
2014-11-19 16:27:04.582 PrincessCelebrate-iOS[2313:169682] Used: 52.261719 MB out of 502.984375 MB (10.390326%)
2014-11-19 16:27:04.616 PrincessCelebrate-iOS[231
2014-12-13 10:50:33.612 PrincessCelebrate-iOS[205:d603] Used: 79.824219 MB out of 504.953125 MB (15.808244%)
2014-12-13 10:50:34.115 PrincessCelebrate-iOS[205:d603] fileno: 26
2014-12-13 10:50:34.117 PrincessCelebrate-iOS[205:d603] Used: 75.746094 MB out of 504.953125 MB (15.000619%)
2014-12-13 10:50:34.406 PrincessCelebrate-iOS[205:60b] Received memory warning.
2014-12-13 10:50:34.627 PrincessCelebrate-iOS[205:d603] fileno: 26
@qmchenry
qmchenry / gist:fa0a0ab7bbb9f3d1dea2
Created November 19, 2014 22:03
iphone4 with purge audio cache
2014-12-13 11:01:02.556 PrincessCelebrate-iOS[257:d303] Used: 81.863281 MB out of 504.953125 MB (16.212055%)
2014-12-13 11:01:03.061 PrincessCelebrate-iOS[257:d303] fileno: 40
2014-12-13 11:01:03.063 PrincessCelebrate-iOS[257:d303] Used: 81.863281 MB out of 504.953125 MB (16.212055%)
2014-12-13 11:01:03.581 PrincessCelebrate-iOS[257:d303] fileno: 40
2014-12-13 11:01:03.583 PrincessCelebrate-iOS[257:d303] Used: 82.500000 MB out of 504.953125 MB (16.338150%)
2014-12-13 11:01:04.095 PrincessCelebrate-iOS[257:d303] fileno: 40
2014-12-13 11:01:04.097 PrincessCelebrate-iOS[257:d303] Used: 82.484375 MB out of 504.953125 MB (16.335056%)
2014-12-13 11:01:04.601 PrincessCelebrate-iOS[257:d303] fileno: 40
2014-12-13 11:01:04.604 PrincessCelebrate-iOS[257:d303] Used: 82.484375 MB out of 504.953125 MB (16.335056%)
2014-12-13 11:01:05.120 PrincessCelebrate-iOS[257:d303] fileno: 40
Before pngnq: 143.8MB
After pngnq: 136.6
Without be_bc: 116.3
---
Overnight run from 22:19 - 06:24 on Be carousel ipad mini 1g
2014-11-20 22:19:01.581 PrincessCelebrate-iOS[993:156048] cocos2d: surface size: 1024x768
Cocos2d: cocos2d: cocos2d-2.0-rc2-x-2.0.1
2014-11-20 22:19:02.467 PrincessCelebrate-iOS[993:156048] [HockeySDK] WARNING: HockeySDKResources.bundle is missing, will send reports automatically!
2014-11-20 22:19:02.469 PrincessCelebrate-iOS[993:156048] [HockeySDK] WARNING: HockeySDKResources.bundle is missing, make sure it is added!
@qmchenry
qmchenry / QButton.swift
Last active November 23, 2021 18:18
Swift UIButton subclass that implements toggle and backgroundColor for states
import UIKit
class QButton: UIButton {
var isToggle: Bool = false {
didSet {
if isToggle {
self.addTarget(self, action: Selector("touchUpInside:"), forControlEvents: .TouchUpInside)
} else {
self.removeTarget(self, action: Selector("touchUpInside:"), forControlEvents: .TouchUpInside)
}
@qmchenry
qmchenry / gist:4bf7c7734e3df5f2ccc4
Last active September 24, 2015 14:56
highlight cmd line syntax for keynote presenatiosn
My version of https://gist.github.com/jimbojsb/1630790 which amazingly still works four years later
highlight -O rtf File.swift --line-numbers --font-size 32 --font SourceCodePro-Regular -V -J 96 -j 2 --syntax swift --style darkslategray | pbcopy
@qmchenry
qmchenry / NotificationHandler.swift
Last active October 12, 2015 13:08
NSNotification handler protocol extension
public protocol NotificationHandler {
var name: String { get }
func post(object: AnyObject?, userInfo: [NSObject : AnyObject]?)
func observe(observer: AnyObject, selector: Selector, object: AnyObject?)
func remove(observer: AnyObject, object: AnyObject?)
static func remove(observer: AnyObject)
}
public extension NotificationHandler {
func post(object: AnyObject? = nil, userInfo: [NSObject : AnyObject]? = nil) {
case .missedPillYesterday: // "You didn’t log yesterday’s pill! If you missed it, be sure to take both yesterday and today's pill."
return 92 * dayIsToday * isOnMethodPill * renewableNotEnteredToday * renewableNotEnteredYesterday * !isPillPlaceboYesterday * hasBeenOnMethodAtLeastOneDay
case .missedPillYesterdayProgestinOnly: // "Hey there, did you take yesterday's pill on time?"
return 93 * dayIsToday * isOnMethodProgestinPill * renewableNotEnteredToday * renewableNotEnteredYesterday * !isPillPlaceboYesterday * hasBeenOnMethodAtLeastOneDay
@qmchenry
qmchenry / ThinCache.swift
Created April 14, 2016 18:59
Lightweight generic cache
//
// ThinCache.swift
// Planned
//
// Created by Quinn McHenry on 4/10/16.
// Copyright © 2016 Quinn McHenry. All rights reserved.
//
final class ThinCache<T> {
@qmchenry
qmchenry / ThinCache.swift
Created April 14, 2016 18:59
Lightweight generic cache
//
// ThinCache.swift
// Planned
//
// Created by Quinn McHenry on 4/10/16.
// Copyright © 2016 Quinn McHenry. All rights reserved.
//
final class ThinCache<T> {