Skip to content

Instantly share code, notes, and snippets.

View donholly's full-sized avatar

Don Holly donholly

  • hims & hers
  • San Francisco
View GitHub Profile
@donholly
donholly / minFontSize.swift
Last active March 8, 2016 00:42
Find a minimum font size for a collection of strings (untested)
func minimumFontSizeForTitles(titles: [String], boundingSize: CGSize) -> CGFloat {
var minimumFontSize: CGFloat = 100
let labelForSizing = UILabel(frame: CGRect(origin: CGPointZero, size: boundingSize))
labelForSizing.font = UIFont.systemFontOfSize(minimumFontSize)
labelForSizing.adjustsFontSizeToFitWidth = true
for title in titles {
labelForSizing.text = title
minimumFontSize = min(minimumFontSize, labelForSizing.font.pointSize)
✘ ⮀ ~/Dropbox/Projects/atomic/yapa-rails-modules/api ⮀ ⭠ master± ⮀ git push staging master
Counting objects: 18, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 2.14 KiB | 0 bytes/s, done.
Total 12 (delta 9), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/ryandotsmith/nginx-buildpack.git
Thread 10Queue : com.tenjin.ios.serial.queue (serial)
#0 0x0000000116df6dbb in objc_exception_throw ()
#1 0x00000001174b9d72 in -[__NSDictionaryM setObject:forKey:] ()
#2 0x000000010fd1b859 in -[TenjinApiClient deviceDataWithEvent:andEventValue:] at /Users/christopherfarm/tenjin/ios-sdk/TenjinSDK/TenjinSDK/TenjinSDK.m:495
#3 0x000000010fd19a9e in __37-[TenjinApiClient pingEventWithName:]_block_invoke at /Users/christopherfarm/tenjin/ios-sdk/TenjinSDK/TenjinSDK/TenjinSDK.m:234
#4 0x000000011859cef9 in _dispatch_call_block_and_release ()
#5 0x00000001185bd49b in _dispatch_client_callout ()
#6 0x00000001185a3988 in _dispatch_queue_drain ()
#7 0x00000001185a2ea9 in _dispatch_queue_invoke ()
#8 0x00000001185a5af2 in _dispatch_root_queue_drain ()
// App Delegate:
BOOL delayTaplyticsLoad = (![EAAppState sharedInstance].currentlySignedIn || ![EAAppState sharedInstance].walkthroughDisplayed);
NSDictionary *options;
if (delayTaplyticsLoad) {
options = @{@"delayLoad": @7};
}
[Taplytics startTaplyticsAPIKey:[EAAppState sharedInstance].appSettings.taplyticsAPIKey
@donholly
donholly / gist:b0f9aa6efe0f0a70ec90
Last active August 29, 2015 14:23
Reveal Crash
(lldb) po [[UIApplication sharedApplication] valueForKey:@"windows"]
<__NSArrayM 0x172248640>(
<EAWindow: 0x14cd74e20; baseClass = UIWindow; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x174459a40>; layer = <UIWindowLayer: 0x174432420>>,
<UITextEffectsWindow: 0x14cf092b0; frame = (0 0; 375 667); opaque = NO; layer = <UIWindowLayer: 0x170835140>>,
<EAInternalSpeedIndicatorView: 0x14cd70750; baseClass = UIWindow; frame = (0 0; 375 20); gestureRecognizers = <NSArray: 0x174457a00>; layer = <UIWindowLayer: 0x174430dc0>>,
<MTStatusBarOverlay: 0x14ce9c880; baseClass = UIWindow; frame = (0 0; 375 20); alpha = 0; gestureRecognizers = <NSArray: 0x17425fad0>; layer = <UIWindowLayer: 0x174622ee0>>,
<UIWindow: 0x14ce8f030; frame = (0 0; 0 0); hidden = YES; gestureRecognizers = <NSArray: 0x170240ab0>; layer = <UIWindowLayer: 0x17043fee0>>
)
//
// EAImageCacheEntity.h
// Pods
//
// Created by Don Holly on 3/4/15.
//
//
#import <FastImageCache/FICEntity.h>
Verifying that +donholly is my openname (Bitcoin username). https://onename.io/donholly
--Boundary+0xAbCdEfGbOuNdArY
Content-Disposition: form-data; name="id"
5595757
--Boundary+0xAbCdEfGbOuNdArY