Skip to content

Instantly share code, notes, and snippets.

View juliantejera's full-sized avatar

Julian Tejera-Frias juliantejera

View GitHub Profile
@juliantejera
juliantejera / README.md
Last active January 29, 2024 12:37
Politica de Privacidad de Combustibles Dominicanos

Política de Privacidad de "Combustibles Dominicanos"

Última Actualización: 28 de Enero de 2024

Bienvenido a la aplicación iOS "Combustibles Dominicanos". Su privacidad es importante para nosotros. Esta Política de Privacidad explica cómo recopilamos, utilizamos, divulgamos y protegemos su información cuando utiliza nuestra aplicación.

1. INFORMACIÓN QUE RECOGEMOS

Datos de Uso

Cuando utiliza "Combustibles Dominicanos", recopilamos datos no personales relacionados con su uso de la aplicación. Estos datos se utilizan exclusivamente para mejorar la funcionalidad y la experiencia del usuario en nuestra aplicación. Los datos incluyen, pero no se limitan a:

@juliantejera
juliantejera / README.md
Created January 29, 2024 01:40
Privacy Policy for Combustibles Dominicanos

Privacy Policy for "Combustibles Dominicanos"

Last Updated: 2024-01-28

Welcome to the "Combustibles Dominicanos" iOS application. Your privacy is important to us. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our application.

1. INFORMATION WE COLLECT

Usage Data

When you use "Combustibles Dominicanos", we collect non-personal data related to your app usage. This data is exclusively used to enhance the functionality and improve the user experience of our app. The data includes, but is not limited to:

struct Alien: Decodable {
private enum CodingKeys: String, CodingKey {
case humans
}
let humans: [Human]
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
@juliantejera
juliantejera / DecodingExtension.swift
Created April 8, 2019 02:52
Decoding Extensions
extension KeyedDecodingContainer where K : CodingKey {
func decodeArrayWithOptionalElements<T>(_ type: [T].Type, forKey key: KeyedDecodingContainer<K>.Key) throws -> [T] where T : Decodable {
return (try decode([DecodableContainer<T>].self, forKey: key)).compactMap { $0.value }
}
}
extension JSONDecoder {
@juliantejera
juliantejera / Alien.swift
Created April 8, 2019 02:40
Alien with Decodable Container
struct Alien: Decodable {
private enum CodingKeys: String, CodingKey {
case humans
}
let humans: [Human]
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
@juliantejera
juliantejera / DecodableContainer.swift
Created April 8, 2019 02:36
Decodable Container to parse types.
struct DecodableContainer<T>: Decodable where T: Decodable {
let value: T?
init(from decoder: Decoder) throws {
value = try? T.init(from: decoder)
}
}
@juliantejera
juliantejera / Alien.json
Created April 8, 2019 02:28
How an Alien is Formed...
{
"humans": [
{
"age": 28,
"name": "Julian"
},
{
"age": 32,
"name": "Waldo"
},
@juliantejera
juliantejera / Models.swift
Created April 8, 2019 02:08
Human and Alien Models
struct Human: Decodable {
let age: Int
let name: String
}
struct Alien: Decodable {
let humans: [Human]
}
@juliantejera
juliantejera / RainbowPlayground.swift
Last active July 1, 2017 01:41
How to draw a rainbow with Bezier Paths
//: Playground - noun: a place where people can play
import UIKit
import Foundation
import PlaygroundSupport
extension UIColor {
class var indigo: UIColor {
return UIColor(colorLiteralRed: 75.0/255.0, green: 0, blue: 130.0/255.0, alpha: 1)
//
// RepositoryParserLiaison.swift
// Fire
//
// Created by Julian Tejera on 6/13/15.
// Copyright (c) 2015 Julian Tejera. All rights reserved.
//
import Foundation