Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am carlynorama on github.
  • I am carlynorama (https://keybase.io/carlynorama) on keybase.
  • I have a public key whose fingerprint is 3B2B 88B1 5F5B BBB0 ED2D 5628 CB52 8406 3DC4 5080

To claim this, I am signing this object:

@carlynorama
carlynorama / caffine_checker.swift
Last active August 21, 2016 00:18
The viewcontroller.swift from super basic hello world app
//Updated 2016/08/20
//carlynorama
//no rights reserved. CC0
import UIKit
class ViewController: UIViewController {
@IBOutlet var numberOfCupsTextField: UITextField!
@carlynorama
carlynorama / arrays_sets_dictionary_scratchpad.swift
Last active August 22, 2016 16:23
Updated, but in progress array, set and dictionary scartch pad for Swift, Xcode 8 beta 6
//Array, Dictionary Scratch Pad, Swift Xcode 8 Beta 6
//2016. 08
//carlynorama, license: CC0
// Some from Rob Percival's iOS 10 on Udemy, some from swift docs and previous swift 2.1 work
//https://www.udemy.com/complete-ios-10-developer-course/
//https://developer.apple.com/reference/swift/dictionary
import UIKit
@carlynorama
carlynorama / docatchtrydeferguard.swift
Created August 22, 2016 15:47
Learning about the pros and cons of guard statements vs if/else's. Guard better than nested if's... NOT necessarily better for if/else's when there needs to be AND checking??
//do catch try defer guard small example, Swift Xcode 8 Beta 6
//2016. 08
//carlynorama, license: CC0
//https://www.udemy.com/complete-ios-10-developer-course/
//https://developer.apple.com/reference/swift/dictionary
//https://www.hackingwithswift.com/new-syntax-swift-2-error-handling-try-catch
import UIKit
@carlynorama
carlynorama / guessinggame_update.swift
Last active August 22, 2016 18:57
Guessing game revised for swift 3
//
// ViewController.swift
// Swift3GuessingGame
//
// Created by carlynorama on 2016-08-22
// License CC0 - No rights reserved.
//
// Exercise for Udemy Class
// https://www.udemy.com/complete-ios-10-developer-course/learn/v4/t/lecture/5449438?start=90
@carlynorama
carlynorama / inky_blink_pinky_clyde.swift
Created August 23, 2016 22:24
Getting down with classes, early days Swift 3
@carlynorama
carlynorama / checkforprime_update.swift
Last active August 25, 2016 23:08
Prime checking updated from swift 2 to swift 3
// Created by carlynorama on 2016-08-22
// License CC0 - No rights reserved.
import UIKit
//I seem to need function to get the case statement function matching to work.
//STILL don't know why yet.
//To read: http://oleb.net/blog/2015/09/swift-pattern-matching/
//To read fall 2016: https://www.raywenderlich.com/134844/pattern-matching-in-swift
func ~=<T>(pattern: (T) -> Bool, value: T) -> Bool {
@carlynorama
carlynorama / Senate Select Committee on Ethics
Last active January 9, 2017 17:40
The Senate Select Committee on Ethics phone numbers in case websites go down.
Main Number (202) 224-2981
Chair Johnny Isakson R Georgia 2022 (770) 661-0999 (202) 224-3643 http://www.isakson.senate.gov/
Vice Chair Christopher A. Coons D Delaware 2020 (302) 573-6345 (202) 224-5042 https://www.coons.senate.gov/
Member Pat Roberts R Kansas 2020 (316) 263-0416 202-224-4774 http://www.roberts.senate.gov/
Member Brian Schatz D Hawaii 2022 (808) 523-2061 (202) 224-3934 http://www.schatz.senate.gov/
Member James E Risch R Idaho 2020 (208) 342-7985 (202) 224-2752 https://www.risch.senate.gov/
Member Jeanne Shaheen D New Hampshire 2020 (603) 647-7500 (202) 224-2841 https://www.shaheen.senate.gov/te.gov/
//Majority Leader Mitch McConnell R Kentucky 2020 (502) 582-6304 (202) 224-2541 https://www.mcconnell.sena
- --- -.. / .. ... / -- -.-- / ... .-- . . - .... . .- .-. - .-.-.-
.- .-.. .-.. / - .... . / -- ..- ... .. -.-. / ..-. --- .-. / - .... . / -.. .- -. -.-. .
- .-. .. .--. ... / ..-. --- .-. .-- .- .-. -.. / ..-. .-. --- -- / .... .. ... / . -.-- . ... .-.-.-
@carlynorama
carlynorama / CALayerAnimations.swift
Last active May 18, 2017 15:10
Key to note, the circle is defined as being it's final state. The animation has its "from" set.
import UIKit
import PlaygroundSupport
//To actually liveView enable View > Assitant Editor
//https://stackoverflow.com/questions/33543460/ios-playground-doesnt-show-ui-preview
//https://possiblemobile.com/2015/03/prototyping-uiview-animations-swift-playground/
//https://stackoverflow.com/questions/10938223/how-can-i-create-an-cabasicanimation-for-multiple-properties
//https://developer.apple.com/library/content/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html#//apple_ref/doc/uid/TP40009503-CH6-SW12
//https://developer.apple.com/reference/quartzcore/caanimationgroup