Skip to content

Instantly share code, notes, and snippets.

View paulyoung's full-sized avatar
💭
Type check and prove things

Paul Young paulyoung

💭
Type check and prove things
View GitHub Profile
+form(name="log-in-form")
+input('Username')(type="text", id="log-in-form-username", required)
+input('Password')(type="password", id="log-in-form-password", required)
+input('Remember me')(type="checkbox", id="log-in-form-remember-me")
+submit('Log in')
form(name="log-in-form", novalidate)
dl.form
dt
label(for="log-in-form-username") Username
dd
input(type="text", id="log-in-form-username", required)
dl.form
dt
label(for="log-in-form-password") Password
h1 [heading text goes here]
a(href="[link goes here]") [link text goes here]
block heading
h1 [heading text goes here]
block link
a(href="[link goes here]") [link text goes here]
mixin heading(text)
h1= text
mixin link(text, href)
a(href=href)= text
block context
h1= headingText
a(href=href)= linkText
extends abstract
block append context
headingText = 'Jade'
linkText = 'Issues'
href = 'https://github.com/visionmedia/jade/issues'
@paulyoung
paulyoung / README.md
Created October 1, 2013 10:40 — forked from 0xced/README.md

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}"
@paulyoung
paulyoung / DynamicType.m
Created March 25, 2014 01:21
Dynamic type sizes
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]);

Keybase proof

I hereby claim:

  • I am paulyoung on github.
  • I am py (https://keybase.io/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: