Skip to content

Instantly share code, notes, and snippets.

View jstart's full-sized avatar
💭
Learning SwiftUI... slowly

Christopher Truman jstart

💭
Learning SwiftUI... slowly
View GitHub Profile
@jstart
jstart / gist:2399387
Created April 16, 2012 15:13
MKAnnotationView Animation example
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
if ([views count] > 1 && self.animatePins) { //Use a boolean to make sure animation does not get interrupted
MKAnnotationView *animateAV;
int i = 0;
self.animatePins = NO;
NSLog(@"did add annotationview, count:%d", [views count]);
for (animateAV in views) {
CGRect endFrame = animateAV.frame;
i= i + 120;
@jstart
jstart / Postable Contact
Created November 21, 2013 05:20
Postable Email That didn't come through.
Hey Postable Guys!
First off, love your product, its amazing. You saved my fiancée and I a ton of time. My bride to be created a private Facebook event, posted a link for people to provide their contact info in the event, and within a few weeks we had 100% of the addresses we needed in Postable. We are planning to send our thank you cards with your service after we get married in January.
I hit you guys up on twitter this weekend (https://twitter.com/iAmChrisTruman/status/396698964008771584) regarding a Postable API or remote export options. This weekend, my fiancée and I were at AngelHackLA (https://apphack13la.eventbrite.com/) were building a product we call Wedmail that would make designing and sending Save the Date Postcards as easy as posting to Instagram.
I read through your twitter history and saw that people have been requesting features like RSVP’s or Save the Dates and it sounds like you are already thinking of building some of these features into Postable. We are planning to build out Wed
@jstart
jstart / touchID
Last active July 28, 2017 17:58
Touch ID Example
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"Authenticate using your finger";
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"User is authenticated successfully");
} else {
#!/bin/sh
PLIST_BUDDY=/usr/libexec/PlistBuddy
function add_compatibility() {
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \
"$1/Contents/Info.plist"
}
function has_compatibility() {
@jstart
jstart / gist:035d7dcdc47166416512
Created May 21, 2015 18:52
Jack Flintermann's lovely mug
//
// SNGUserPhotosController.m
// Singles-eHarmony
//
// Created by Jack Flintermann
// Copyright (c) 2012 eHarmony. All rights reserved.
//
//
// 77$Z8DD88O8ZZOZ7II77II?????+++++++====================+=++++++?????7?I77O$$777II
// $7$O8D8O88OZ$$77IIIII????++++++++=======================++++++??????II77$$$77III
//
// main.swift
// pggrep
//
// Created by Erica Sadun on 6/17/15.
// Copyright © 2015 Erica Sadun. All rights reserved.
//
import Foundation
@jstart
jstart / pggrep.swift
Last active August 29, 2015 14:23 — forked from erica/pggrep.swift
//
// main.swift
// pggrep
//
// Created by Erica Sadun on 6/17/15.
// Copyright © 2015 Erica Sadun. All rights reserved.
//
import Foundation
@jstart
jstart / UIStackViewDistribution.swift
Created August 4, 2015 23:18
UIStackViewDistribution
enum UIStackViewDistribution : Int {
case Fill
case FillEqually
case FillProportionally
case EqualSpacing
case EqualCentering
}
@jstart
jstart / UIStackViewAlignment.swift
Created August 4, 2015 23:19
UIStackViewAlignment
enum UIStackViewAlignment : Int {
case Fill
case Leading
static var Top: UIStackViewAlignment { get { return .Leading} }
case FirstBaseline
case Center
case Trailing
static var Bottom: UIStackViewAlignment { get{ return .Trailing} }
case LastBaseline
}
{"data":{"pricingTiers":[{"tierStem":"0","tierName":"Free","pricingInfo":[{"country":"United States","countryCode":"US","currencySymbol":"$","currencyCode":"USD","wholesalePrice":0.00,"retailPrice":0.00,"fRetailPrice":"$0.00","fWholesalePrice":"$0.00"},{"country":"Canada","countryCode":"CA","currencySymbol":"$","currencyCode":"CAD","wholesalePrice":0.00,"retailPrice":0.00,"fRetailPrice":"$0.00","fWholesalePrice":"$0.00"},{"country":"Mexico","countryCode":"MX","currencySymbol":"$","currencyCode":"MXN","wholesalePrice":0.00,"retailPrice":0.00,"fRetailPrice":"$0.00","fWholesalePrice":"$0.00"},{"country":"Australia","countryCode":"AU","currencySymbol":"$","currencyCode":"AUD","wholesalePrice":0.00,"retailPrice":0.00,"fRetailPrice":"$0.00","fWholesalePrice":"$0.00"},{"country":"New Zealand","countryCode":"NZ","currencySymbol":"$","currencyCode":"NZD","wholesalePrice":0.00,"retailPrice":0.00,"fRetailPrice":"$0.00","fWholesalePrice":"$0.00"},{"country":"Japan","countryCode":"JP","currencySymbol":"¥","currencyCode":"