Skip to content

Instantly share code, notes, and snippets.

Paul Young paulyoung

View GitHub Profile
View Main.purs
-- | Based on
module Main where
import Prelude
import React as R
import React.DOM as R
import React.DOM.Props as RP
import Thermite hiding (defaultMain) as T
import Thermite.Try as T
View gist:31ef0ec33448756e6a6b
Verifying I am +py on my passcard.
paulyoung / println.swift
Created May 8, 2015
View println.swift
import JavaScriptCore
let println: @objc_block AnyObject! -> Void = { object in
paulyoung / UIColor.swift
Created May 8, 2015
View UIColor.swift
import UIKit
import JavaScriptCore
@objc protocol UIColorJSExport: class, JSExport {
// Mark: - Creating a UIColor with Preset Component Values
class func blackColor() -> UIColor
class func blueColor() -> UIColor
class func brownColor() -> UIColor
View gist:486ac9ef5d3581190bc6
$ strings /Applications/|grep source\\. | sort
View AboutTab.m
// FYI I also auto set the version and build on the About tab with the following code
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *appDisplayName = infoDictionary[@"CFBundleDisplayName"];
NSString *majorVersion = infoDictionary[@"CFBundleShortVersionString"];
NSString *minorVersion = infoDictionary[@"CFBundleVersion"];
self.appDescription.text = [NSString stringWithFormat:@"Dirty Dog Software\n%@\nVersion: %@(%@)",
appDisplayName, majorVersion, minorVersion];

Keybase proof

I hereby claim:

  • I am paulyoung on github.
  • I am py ( on keybase.
  • I have a public key whose fingerprint is 5597 E5A5 C4EC 824B F32B CD65 F135 9D72 690D 4347

To claim this, I am signing this object:

paulyoung / DynamicType.m
Created Mar 25, 2014
Dynamic type sizes
View DynamicType.m
NSLog(@"Headline: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleHeadline] pointSize]);
NSLog(@"Subheadline: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleSubheadline] pointSize]);
NSLog(@"Body: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody] pointSize]);
NSLog(@"Caption1: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleCaption1] pointSize]);
NSLog(@"Caption2: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleCaption2] pointSize]);
NSLog(@"Footnote: %f", [[UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleFootnote] pointSize]);

Using HockeySDK as an example

  1. Download HockeySDK 3.0.0
  2. Run these commands:
export FRAMEWORK_DIRECTORY="${HOME}/Downloads/HockeySDK-iOS-3/HockeySDK.embeddedframework"
export FRAMEWORK_NAME=$(basename `echo "${FRAMEWORK_DIRECTORY}"/*.framework` .framework)

echo "int main(int argc, char *argv[]) { return 0; }" | clang -x c -arch armv7 -ObjC -flat_namespace -undefined suppress -isysroot `xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -Xlinker -objc_abi_version -Xlinker 2 -F"${FRAMEWORK_DIRECTORY}" -framework "${FRAMEWORK_NAME}" -o "${TMPDIR}/${FRAMEWORK_NAME}" - && class-dump "${TMPDIR}/${FRAMEWORK_NAME}"
You can’t perform that action at this time.