Skip to content

Instantly share code, notes, and snippets.

Clint Cabanero ccabanero

  • Seattle, WA
Block or report user

Report or block ccabanero

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
@ccabanero
ccabanero / AWS CLI - S3 Snippets
Last active Nov 21, 2019
AWS CLI - S3 Snippets
View AWS CLI - S3 Snippets
1. Create profile that uses provided AWS Access Key IDs and Secret Access Keys from your AWS admin.
$ aws configure --profile Clint
$ aws configure --profile ClintClient1
$ aws configure --profile ClintClient2
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-1
Default output format [None]:
@ccabanero
ccabanero / AWS CLI Cheat Sheet
Last active Jul 4, 2019
AWS CLI Cheat Sheet
View AWS CLI Cheat Sheet
See Profiles Configured on Machine:
$ vim ~/.aws/config
$ vim ~/.aws/credentials
Create profile
$ aws configure --profile YourProfileName1
$ aws configure --profile YourProfileName2
@ccabanero
ccabanero / category-re-order
Last active Sep 6, 2017
category-re-order
View category-re-order
<style>
.product-price {
display:none;
opacity: 0;
}
/* re-order categories */
.category-nav .category-nav-links {
display: -webkit-box;
display: -ms-flexbox;
@ccabanero
ccabanero / swift-lunch-ARKit
Last active Aug 16, 2017
swift-lunch-ARKit
View swift-lunch-ARKit
Swift Lunch: Getting Started with ARKit (Augmented Reality framework for iOS 11).
Goals:
1. We'll review basic concepts of ARKit, run AR demos, review code, and go over steps to setup your development environmnet to start hacking with ARKit.
2. Discuss/brainstorm various AR prototypes that SpatialDev wants to implement over the next 1.5 months.
Time:
A minimum of 20-30 minutes. Can go longer if we want to do more code review.
@ccabanero
ccabanero / Creating a Virtual Machine of Xcode 9 Beta
Last active Jun 9, 2017
Creating a Virtual Machine of Xcode 9 Beta
View Creating a Virtual Machine of Xcode 9 Beta
Scenario:
1. You have an Apple Developer subscription.
2. You currently have several apps that you need to maintain/update before Xcode 9 is officially released.
3. You don't want to install Xcode 9 beta on your Mac - but you still want to play with the Xcode 9 beta.
One Possible Solution:
Use Parallels to create a virtual machine of macOS then install Xcode 9 beta on it.
Step 1: Get macOS Sierra (current Version)
a. Open the App Store application on your current version of macOS.
@ccabanero
ccabanero / Swift 3 Protocol Pattern Snippet
Created Jan 10, 2017
Swift 3 Protocol Pattern Snippet
View Swift 3 Protocol Pattern Snippet
// set up - MapViewController is the parent. A ContainerView is used to place the UI for directions - part of the DirectionsViewController.
// The DirectionsViewController has a protocol method for letting the delegate know when a user has tapped the 'get directions' button and passes the to and from data
// this ViewController is the delegate for the DirectionsViewController
Class MapViewController: UIViewController, DirectionsViewControllerDelegate {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// for getting access to the DirectionsViewController and settings its delegate as THIS controller
View gist:b50349bb9d87de79d93a7e2aa84a3a48
Parts of the doc that I don't want to forget ...
# finding a realm file - so you can view in Realm Browser
# link: https://realm.io/docs/swift/latest/#finding-a-realm-file
in lldb ... po Realm.Configuration.defaultConfiguration.fileURL
in terminal open the above path
# seperate realms for different users
# link: https://realm.io/docs/swift/latest/#other-realms
@ccabanero
ccabanero / Feature Branch Git Workflow
Last active Jun 12, 2018
Feature Branch Git Workflow
View Feature Branch Git Workflow
1. Create an empty develop branch (off of master) and pushes it to the server
git branch development
git push -u origin development
2. Clone the central repo and creates a tracking branch for develop
git clone url/to/repo
git checkout development
@ccabanero
ccabanero / iOS Unit Test Sample: ViewController can respond to an Unwind Segue
Created May 13, 2016
iOS Unit Test Sample: ViewController can respond to an Unwind Segue
View iOS Unit Test Sample: ViewController can respond to an Unwind Segue
func testSUT_CanResponseTo_UnwindSegue() {
// create source ViewController for unwind segue (i.e. the PlaceSearchViewController
let storyboard: UIStoryboard = UIStoryboard(name: "Main_iPhone", bundle: nil)
let placeSearchVC = storyboard.instantiateViewControllerWithIdentifier("PlaceSearchViewController") as! PlaceSearchViewController
placeSearchVC.targetSearchText = "Lincoln, NE"
let _ = placeSearchVC.view
// create unwind segue
let unwindSegue = UIStoryboardSegue(identifier: "unwindFromPlaceSearchViewController", source: placeSearchVC, destination: systemUnderTest)
@ccabanero
ccabanero / Sample iOS Unit Tests: Working with a ViewController composed of UISearchBar
Last active Jun 6, 2019
Sample iOS Unit Tests: Working with a ViewController composed of UISearchBar
View Sample iOS Unit Tests: Working with a ViewController composed of UISearchBar
import XCTest
@testable import YourProjectModule
class ViewControllerTest: XCTestCase {
var systemUnderTest: ViewController!
override func setUp() {
super.setUp()
You can’t perform that action at this time.