This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIColor { | |
convenience init(hexaString: String, alpha: CGFloat = 1) { | |
let chars = Array(hexaString) | |
self.init(red: CGFloat(strtoul(String(chars[1...2]), nil, 16))/255, | |
green: CGFloat(strtoul(String(chars[3...4]), nil, 16))/255, | |
blue: CGFloat(strtoul(String(chars[5...6]), nil, 16))/255, | |
alpha: alpha) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIImage { | |
static func imageWithColor(color: UIColor, size: CGSize = CGSize(width: 1, height: 1)) -> UIImage? { | |
UIGraphicsBeginImageContext(size) | |
if let context = UIGraphicsGetCurrentContext() { | |
context.setFillColor(color.cgColor) | |
context.fill(CGRect(origin: .zero, size: size)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: openjdk:11-jdk-slim | |
definitions: | |
caches: | |
gradlewrapper: ~/.gradle/wrapper | |
steps: | |
- step: &lint | |
name: Lint | |
caches: | |
- gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: openjdk:11-jdk-slim | |
definitions: | |
caches: | |
gradlewrapper: ~/.gradle/wrapper | |
gke-kubectl-pipe: &pipe atlassian/google-gke-kubectl-run:1.3.1 | |
gke-kubectl-pipe-variables: &pipe-variables | |
KEY_FILE: $GKE_API_KEYFILE | |
PROJECT: $GCP_PROJECT_ID | |
COMPUTE_ZONE: $GKE_COMPUTE_ZONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<title>OAuth Authorization Code + PKCE in Vanilla JS</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | |
<!-- | |
MIT License | |
Copyright (c) 2019 Aaron Parecki | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"countries": [{ | |
"code": "AF", | |
"name": "Afghanistan", | |
"phoneCode": "93" | |
}, | |
{ | |
"code": "AL", | |
"name": "Albania", | |
"phoneCode": "355" |