Skip to content

Instantly share code, notes, and snippets.

View timd's full-sized avatar
💭
Typing all the right things, not necessarily in the right order

Tim Duckett timd

💭
Typing all the right things, not necessarily in the right order
View GitHub Profile
{
"info": {
"name": "Fastmail JMAP",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Fastmail JMAP",
"item": [
{
Advanced Animations with UIKit
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/230lc4n1loob9/230/230_hd_advanced_animations_with_uikit.mp4?dl=1
pdf: https://devstreaming-cdn.apple.com/videos/wwdc/2017/230lc4n1loob9/230/230_advanced_animations_with_uikit.pdf
Advanced Touch Bar
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/222ijxk2akkrebmr/222/222_hd_advanced_touch_bar.mp4?dl=1
pdf: https://devstreaming-cdn.apple.com/videos/wwdc/2017/222ijxk2akkrebmr/222/222_advanced_touch_bar.pdf
Advances in TVMLKit
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/202ximbb9e2dq222/202/202_hd_advances_in_tvmlkit.mp4?dl=1
@timd
timd / einbuerderingtest.html
Created January 29, 2024 13:16
einbuergeringtest
<span class>
1:
</span> In Deutschland dürfen Menschen offen etwas gegen die Regierung sagen, weil …
<ul class="faq_answer px-4">
<li class="py-1 px-1" x-data="{ highlight: 0}">
<span :class="{'einburgerungs_test_answer' : highlightAnswers && highlight}">
hier Religionsfreiheit gilt.
</span>
</li>
<li class="py-1 px-1" x-data="{ highlight: 0}">
@timd
timd / SFOAuthProcess
Created July 1, 2013 10:33
A basic Salesforce OAuth login process using the Salesforce iOS SDK, implemented as a single standalone view controller
//
// SFAuthDemoViewController.m
//
// Created by Tim Duckett on 19/06/2013.
// Copyright (c) 2013 Charismatic Megafauna Ltd. All rights reserved.
//
#import "SFAuthDemoViewController.h"
#import "SFAccountManager.h"
#import "SFRestAPI.h"
@timd
timd / gist:3293993
Created August 8, 2012 10:12
Adding UIGestureRecognizer to UIWebView
Add gesture recognizer to UIWebView:
UITapGestureRecognizer *tapCatcher = [[UITapGestureRecognizer alloc] init];
[tapCatcher setNumberOfTapsRequired:1];
[tapCatcher setNumberOfTouchesRequired:1];
[tapCatcher setDelegate:self];
[tapCatcher addTarget:self action:@selector(didTapOnView)];
[self.webView addGestureRecognizer:tapCatcher];
@timd
timd / gist:5141930
Last active December 14, 2015 20:09
Assume Xcode project file structure like:
Project/
- project.xcworkspace
- project.xcodeproj
- Project/
- assets/
- data/
- css/
- html/
@timd
timd / gist:5124491
Created March 9, 2013 15:23
A Javascript bookmarklet to post links to Pinboard. Adds the currently-selected text on the page in quotes as the bookmark's description.
javascript:q=location.href;if(document.getSelection){d%20=%20'"'%20+%20document.getSelection()%20+%20'"';}else{d='';};p=document.title;void(open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,scrollbars=yes,width=750,height=700'));
@timd
timd / gist:4953742
Created February 14, 2013 15:59 — forked from alloy/gist:4952606

Obviously, the simplest solution would be for the client to share their account details or add us as ‘team admin’, but that is not what this is about.

  1. [Add us to your iOS Developer Program as ‘team member’.][1]
  2. [Create a ‘Distribution Certificate’, if you haven’t got one already.][2]
  3. [Create a ‘App Store Distribution Provisioning Profile’.][3]
  4. [Export the ‘Distribution Certificate’ assets and send the export and password to us.][4] (For security sake, it’s a good idea to send us the password via other means than the exported certificate. E.g. by phone/SMS.)
@timd
timd / gist:4953071
Created February 14, 2013 14:11
Example of Kiwi test involving Magical Record managed objects and view controllers
#import "Kiwi.h"
#import "MyController.h"
#import "Record.h"
#import "MyModel.h"
// Category on class under test to expose private properties / methods
@interface MyController(MyTest)
@property (nonatomic, strong) NSDictionary *aDictionary;
@property (weak, nonatomic) IBOutlet UIButton *aButton;
@timd
timd / gist:4953078
Last active December 13, 2015 18:08
Example of Kiwi test involving Magical Record and view controllers
#import "Kiwi.h"
#import "MyController.h"
#import "Record.h"
#import "MyModel.h"
// Category on class under test to expose private properties / methods
@interface MyController(MyTest)
@property (nonatomic, strong) NSDictionary *aDictionary;
@property (weak, nonatomic) IBOutlet UIButton *aButton;