Skip to content

Instantly share code, notes, and snippets.

View AdrianBinDC's full-sized avatar

Adrian AdrianBinDC

  • DC Metro Area
View GitHub Profile

Git Tutorial

Create a new repo

In the root directory of the project you want to have version control, type the following:

git init

This is a one time thing. After you initialize the repo, you won't have to do it again.

Create a branch

//
// TwoHandledSlider.swift
// CombineQuake
//
// Created by Adrian Bolinger on 4/17/21.
//
import SwiftUI
struct TwoHandledSliderView: View {

Passing the AWS Certified Solutions Architect Associate Exam

Getting Started

Q: How do you eat an elephant?

A: One bite at a time.

Learning the Cloud Practitioner Material

Review

S3 and IAM Summary

  • IAM consists of the following
    • Users
    • Groups
    • Roles
    • Policies
      • Policies are in a JSON file

Issues

CocoaPod Bloat

  • There's a ton of CocoaPods in the project. Do you need them all?
    • I see two types of cocoapods for image caching

Lack of Tests

  • there are only tests for one class and they don't pass
  • I should be able to download the repo, install the cocoapods and run the tests and they should all pass without having to jump through special hoops.me.com
@AdrianBinDC
AdrianBinDC / ChatEngine Sketch
Created June 3, 2020 13:23
Stub implementation for ChatEngine for Pursuit Students
import UIKit
/*
This is a high-level physics for poets sketch of an implementation for
sending and receiving messages. YOU'LL NEED TO REFINE IT.
If you want to implment encryption, I'd use a framework like CryptoKit,
or some well-known, public framework w/ a lotta stars, recent commits,
and not a lot of issues on the GitHub page.
@AdrianBinDC
AdrianBinDC / new-in-4-2.md
Created August 5, 2018 00:30
New in Swift 4.2

New in Swift 4.2

Summary from HackingWithSwift.com

CaseIterable

The CaseIterable protocol provides an allCases method that turns all of your cases into an array.

enum Pasta: String, CaseIterable {

case canneloni = "Cannelloni pasta"

@AdrianBinDC
AdrianBinDC / ConvertDistances.swift
Created July 11, 2018 03:07
Convert distances from one unit of measurement to another
extension Double {
func convert(from originalUnit: UnitLength, to convertedUnit: UnitLength) -> Double {
return Measurement(value: self, unit: originalUnit).converted(to: convertedUnit).value
}
}
/*
let miles = 26.2
let meters = miles.convert(from: .miles, to: .meters)
*/
@AdrianBinDC
AdrianBinDC / ConnectivityUtil.swift
Last active July 28, 2018 03:17
Connectivity Utility Implementation using Reachability
//
// ConnectivityUtility.swift
//
// Created by Adrian Bolinger on 7/10/18.
// Copyright © 2018 Adrian Bolinger. All rights reserved.
//
import UIKit
import Reachability
@AdrianBinDC
AdrianBinDC / MapRegionUtility.swift
Last active May 19, 2023 01:13
Generate a MKCoordinateRegions for continents and major oceans
//
// MapRegionUtility.swift
// QuakeData
//
// Created by Adrian Bolinger on 7/9/18.
// Copyright © 2018 Adrian Bolinger.
//
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: