Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile

#Continuous Integration and Code Coverage In Xcode# Speaker: Matt Moriarity

###Agenda

  • What is Xcode Server
  • What's new in Xcode 7
  • Code coverage
  • Extending Xcode server

What is Xcode Server

Cocoa Touch Best Practices

Speaker: Luke Hiesterman, UIKit Engineer

Agenda

  • App lifecycle
  • Views and view controllers
  • Auto layout
  • Table and collection views

Goals

Build Better Apps with Value Types in Swift

Agenda

  • Reference semantics
  • Immutability
  • Value semantics
  • Value types in practice
  • Mixing value types and reference types

Reference semantics

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control
def authorize_key_for_root(config, *key_paths)
[*key_paths, nil].each do |key_path|
if key_path.nil?
fail "Public key not found at following paths: #{key_paths.join(', ')}"
end
full_key_path = File.expand_path(key_path)
if File.exists?(full_key_path)
config.vm.provision 'file',
### Rails app generator template. Run it:
### rails new _app_name_ -m https://gist.githubusercontent.com/DamirSvrtan/28a28e50d639b9445bbc/raw/app_template.rb
bin_setup_file = <<-FILE
#!/bin/sh
bundle install
bundle exec rake db:setup
FILE
create_file 'bin/setup', bin_setup_file
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
# ElasticSearch upstart script
description "ElasticSearch service"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
# https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html
# https://www.varnish-cache.org/trac/wiki/VCLExamples
# Summary
# 1. Varnish will poll the backend at /health_check to make sure it is
# healthy. If the backend goes down, varnish will server stale content
# from the cache for up to 1 hour.
# 2. Varnish will pass X-Forwarded-For headers through to the backend
# 3. Varnish will remove cookies from urls that match static content file
# extensions (jpg, gif, ...)
#!/usr/bin/env bash
# Symlink as ~/bin/dibs for happy fun time excitement.
# Nothing pisses me off more than CTRL-c'ing during an import script
# And just having it fire up the next bloody file to import
trap 'echo Control-C trap caught; exit 1' 2 #traps Ctrl-C (signal 2)
# Exit if there is any errors
set -e