Skip to content

Instantly share code, notes, and snippets.

Jason Brennan jbrennan

Block or report user

Report or block jbrennan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jbrennan
jbrennan / wwdc2014
Created Jul 16, 2019 — forked from phnessu4/wwdc2014
wwdc 2014 sessions and pdf
View wwdc2014
pdf
http://devstreaming.apple.com/videos/wwdc/2014/102xxw2o82y78a4/102/102_platforms_state_of_the_union.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/201xx2xfazhzce8/201/201_advanced_topics_in_internationalization.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/202xx3ane09vxdz/202/202_whats_new_in_cocoa_touch.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/203xxh9oqtm0piw/203/203_introducing_healthkit.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/204xxhe1lli87dm/204/204_whats_new_in_cocoa.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/205xxqzduadzo14/205/205_creating_extensions_for_ios_and_os_x,_part_1.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/206xxdiurnffagr/206/206_introducing_the_modern_webkit_api.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/207xx270npvffao/207/207_accessibility_on_os_x.pdf?dl=1
@jbrennan
jbrennan / ViewController.swift
Created Aug 31, 2018
Simple file for converting Localizable.strings key=values back into a codebase
View ViewController.swift
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
let translations = translationsFor(stringsFilePath: "/Users/jasonbrennan/peloton/Argon/Argon/Supporting Files/Localizable.strings")
for translation in translations {
replace(translation: translation, inProjectDirectory: "/Users/jasonbrennan/peloton/Argon/Argon")
}
View Swift 4.md

Hello Everyone,

The Swift 3 release is nearing completion, so it is time to look back on the release, learn from what happened, and use it to shape what we (the Swift community) do in the year ahead. Overall, Swift 3 is going to be an absolutely amazing release, and it is impressive how much got done. Thank you to everyone who contributed to making it happen. Instead of diving into a flurry of new proposals immediately, it is important to take stock of where we are, and look at the bigger picture.

Metapoint: this email is ridiculously long and covers multiple topics. Instead of replying to it directly, it is best to start new threads on individual topics that you’d like to discuss. Just tag them with “[Swift 4]” in the subject line.

Swift 3 Retrospective

Every year of Swift’s development has been completely different from the previous one, and I expect Swift 4 to continue this trend. With a goal of learning and improving year over year, here are some observations & retrospective about Swi

@jbrennan
jbrennan / LineScaling.swift
Created Aug 3, 2016
The math behind a “drag to scale this line” operation.
View LineScaling.swift
extension Line {
/** Returns a scaled line according to the projection of `scalingPoint` onto the receiver.
- parameter scalingPoint: A point interpreted as a vector used for scaling this line. This point should be something like the location of a touch or cursor during a "drag to scale" operation, but the point doesn't have to lie along the line itself. The point **must** be in the same coordinate space as the line.
*/
func lineByScalingToTouchPoint(scalingPoint: Point) -> Line {
// This algorithm works by
// - treating the incoming point as a vector,
@jbrennan
jbrennan / nearthespeedoflight-2016.css
Created Apr 3, 2016
Style for Nearthespeedoflight.com April 2 2016
View nearthespeedoflight-2016.css
/* ============================== */
/* ! */
/* ! Speed of Light style ver 3 */
/* ! Copyright 2016 Jason Brennan */
/* ! */
/* ! April 2 2016 */
/* ! */
/* ============================== */
@jbrennan
jbrennan / nearthespeedoflight.css
Created Apr 3, 2016
Style for Nearthespeedoflight.com from Feb 2013 to April 2016
View nearthespeedoflight.css
/* ============================== */
/* ! */
/* ! Speed of Light style ver 2.6 */
/* ! Copyright 2011 Jason Brennan */
/* ! */
/* ! February 20 2013 */
/* ! */
/* ============================== */
@jbrennan
jbrennan / PrototopeViewController.swift
Created Mar 15, 2016
Example of using setting up Prototope in a UIViewController
View PrototopeViewController.swift
//
// ViewController.swift
// DrawingProto
//
// Created by Jason Brennan on 2015-12-19.
// Copyright © 2015 Jason Brennan. All rights reserved.
//
import UIKit
import Prototope
@jbrennan
jbrennan / ImmediatePanGestureRecognizer.m
Created Dec 29, 2015
A UIPanGestureRecognizer subclass to recognize immediately. Is this a good idea?
View ImmediatePanGestureRecognizer.m
@implementation ImmediatePanGestureRecognizer
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
if (self.numberOfTouches >= self.minimumNumberOfTouches) {
self.state = UIGestureRecognizerStateBegan;
}
}
View feed-subscribers.php
<?php /* With apologies to Dr. Drang and John Siracusa.
feed-subscribers.php
By Marco Arment.
Released into the public domain with no warranties and no restrictions.
Usage: Pipe an Apache access log into stdin, e.g.:
php -f feed-subscribers.php < /var/log/httpd/access_log
@jbrennan
jbrennan / signals.md
Created Nov 16, 2015
Some notes on getting help with Reactive Cocoa Signals with help from a coworker
View signals.md

Notes about Signals

Nacho offered me a little bit of help today with a relatively simple problem. Here are some notes on it for future reference.

The problem

I have a container view which has in it a TabBarView and a ScrollView. When one of the tabs in the tab bar view is tapped, I want it to update its internal state (which button is selected) and then I need the container view to be able to respond as well (to scroll its scrollview).

You can’t perform that action at this time.