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
apiVersion: cert-manager.io/v1alpha2 | |
kind: Certificate | |
metadata: | |
name: wildcard-certificate | |
namespace: cert-manager | |
labels: | |
use-clouddns-solver: "true" | |
spec: | |
secretName: wildcard-certificate-tls | |
dnsNames: |
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
func Handlers() *mux.Router { | |
r := mux.NewRouter().StrictSlash(true) | |
r.Use(CommonMiddleware) | |
r.HandleFunc("/", controllers.TestAPI).Methods("GET") | |
r.HandleFunc("/api", controllers.TestAPI).Methods("GET") | |
r.HandleFunc("/register", controllers.CreateUser).Methods("POST") | |
r.HandleFunc("/login", controllers.Login).Methods("POST") |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
run: hello-world | |
name: hello-world | |
namespace: default | |
spec: | |
selector: | |
matchLabels: |
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 | |
import SDWebImage | |
class ViewController: UIViewController { | |
// MARK: - Outlet | |
@IBOutlet weak var headerImageView: UIImageView! | |
@IBOutlet weak var titleLabel: UILabel! | |
@IBOutlet weak var subtitleLabel: UILabel! | |
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 Foundation | |
class PhotoViewModel { | |
// MARK: - Properties | |
private var photo: Photo? { | |
didSet { | |
guard let p = photo else { return } | |
self.setupText(with: p) | |
self.didFinishFetch?() |
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
apiVersion: certmanager.k8s.io/v1alpha1 | |
kind: ClusterIssuer | |
metadata: | |
name: letsencrypt-staging | |
spec: | |
acme: | |
server: https://acme-staging.api.letsencrypt.org/directory | |
email: [your-email-goes-here] | |
privateKeySecretRef: | |
name: letsencrypt-staging |
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
/** | |
* Verifica que un DNI de Perú sea valido | |
* @param {String} data DNI | |
* @returns {Boolean} | |
*/ | |
const validate = data => { | |
const dni = data.replace('-', '').trim().toUpperCase() | |
if (!dni || dni.length < 9) return false | |
const multiples = [3, 2, 7, 6, 5, 4, 3, 2] | |
const dcontrols = { |
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
# Replace "projectname" and "username" | |
image: golang:1.9 | |
variables: | |
BIN_NAME: projectname | |
ARTIFACTS_DIR: artifacts | |
GO_PROJECT: gitlab.com/username/projectname | |
stages: | |
- build |