Skip to content

Instantly share code, notes, and snippets.

View scott-lydon's full-sized avatar

Scott scott-lydon

  • High Five
  • Burlingame
View GitHub Profile
import UIKit
extension ViewController {
@IBAction func blueTapped(_ sender: Any) {
coordinator?.goToBlueView()
}
}
extension MainCoordinator {
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
let viewController = ViewController.instantiate()
@scott-lydon
scott-lydon / Curriculum.md
Last active September 17, 2022 01:07
iOS Mentee curriculum

My stretch goals:

  • Help you to get a professional offer by May 2023 (Whether you intend to accept it or not).

If you have the following properties/skills it is highly likely you will get an offer

  • Add 1200+ software or software recruiter Connections on Linkedin (this is the foundation of your iOS job hunt pipeline). If you don't have this, it is extremely difficult to get to the skill parts.

  • Create a Linkedin profile that has "jobs" and "Company's" for all the software projects you've worked on, and if you have none, then "jobs" or projects you intend to work on. Like on my Linkedin, I created company pages for projects I've worked on "In order to present them better to the employment market." I don't condone accepting jobs with false pretenses to an employer's detriment, however, the sooner you get experience with the lengthy interview processes, the sooner you can start passing them. You might just finish those projects by the time you get an offer.

  • Go through 40

@scott-lydon
scott-lydon / gist:47eca84dc2d11bc83d38dfae4509b3ad
Created July 18, 2022 20:12
Debug printout for standard Interview.
hash: 463098683679436443 starts
tmpAddress: 0x14e510c20, indexPath: [0, 0], url: https://random.dog/00186969-c51d-462b-948b-30a7e1735908.jpg line 42
Image cache not available tmpAddress: 0x14e510c20, indexPath: [0, 0], url: https://random.dog/00186969-c51d-462b-948b-30a7e1735908.jpg
98 assigning data task! tmpAddress: 0x14e510c20, indexPath: [0, 0], url: https://random.dog/00186969-c51d-462b-948b-30a7e1735908.jpg
before running: nil hash: 463098683679436443
after running: nil hash: 463098683679436443
109 interceptor data action: Optional((Function)), interceptor task: nil
hash: 463098683679436443 ends
@scott-lydon
scott-lydon / ForceUnwrap.md
Last active January 10, 2022 19:39
Unwrap methods: force.

Alternative 1: Force unwrap non-optional dependencies

PROs:

  • No need no use any methods to unwrap on each usage, unless there are cases you anticipate a value to be nil.
var value: String!
value = "Hi"
print(value.count) 
Pod::Spec.new do |s|
s.name = "BlaBlabla"
s.version = "0.1.0"
s.summary = "Description of your project"
s.description = "Mandatorily longer description of your project"
s.homepage = "https://github.com/ElevatedUnderdogs/PracticeCocoaPod1/tree/main"
s.license = "Description of your licence, name or otherwise"
s.author = { "Developer" => "your@email.com" }
s.platform = :ios, "9.0"
@scott-lydon
scott-lydon / RaceCondition.swift
Created June 25, 2021 01:28
A playground demo to demonstrate a common race condition
import UIKit
public extension DateFormatter {
static let iso8601withFractionalSeconds: DateFormatter = {
let formatter = DateFormatter()
formatter.calendar = Calendar(identifier: .iso8601)
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
@scott-lydon
scott-lydon / Alternative.swift
Created May 4, 2021 21:02
private setting variables.
struct CreateAccountViewModel {
var image: Image
var accentText: String
var choosePathVM: ChoosePathViewModel {
didSet {
self.currentHeader = choosePathVM.current
self.employeeDestination = choosePathVM.current.header == HeaderBody.employee.header
self.authViewModel = employeeDestination ? .employeeForm : .businessForm
self.formModel = employeeDestination ? .employee : .business
struct CreateAccountViewModel {
var image: Image = Image("IntroImage")
var accentText: String = "Choose Account type"
var choosePathVM: ChoosePathViewModel = ChoosePathViewModel(index: 0, explanations: [.employee, .business])
var buttonImage: Image = Image(systemName: .rightArrowLine)
var spacerHeight: CGFloat = 40
var currentHeader: HeaderBody {
get {
choosePathVM.current