Skip to content

Instantly share code, notes, and snippets.

@kidcodely
kidcodely / ViewController.swift
Created November 19, 2017 18:54
Gradient (Chameleon)
import UIKit
import ChameleonFramework
class RootViewController: UIViewController {
@IBOutlet var myTitle: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = GradientColor(gradientStyle: .radial, frame: view.frame, colors: [FlatBlue(), FlatPlumDark()])
myTitle.textColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
@kidcodely
kidcodely / ViewController.swift
Created November 19, 2017 18:46
Contrasting Background Example (Chameleon)
import UIKit
import ChameleonFramework
class RootViewController: UIViewController {
@IBOutlet var myTitle: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
myTitle.textColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
}
@kidcodely
kidcodely / pom.xml
Created November 13, 2017 03:02
Hibernate & MySQL Dependencies for Tutorial # 2
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
@kidcodely
kidcodely / application.properties
Created November 13, 2017 03:01
Application properties for tutorial # 2
spring.datasource.url = jdbc:mysql://localhost:3306/{db name}
# Use your MySQL username
spring.datasource.username =
# Use your MySQL password
spring.datasource.password =
spring.datasource.initialize = false
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
# Update The Existing Schema (other options include: validate, create, create-drop)
@kidcodely
kidcodely / pom.xml
Created November 11, 2017 22:04
pom.xml dependencies used for Spring Boot setup (Tutorial 1)
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>