Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Swift + Machine Learning + Big Data

Adolfo fitomad

:octocat:
Swift + Machine Learning + Big Data
View GitHub Profile
View Git cheatsheet.md

Crear un branch local y subirlo a remoto

git branch NEW-BRANCH-NAME
git push -u origin <branch>

Recuperar un branch remoto

git checkout --track origin/daves_branch

Crear tag y subirlo a remoto

View KeyboardResponder.swift
//
// KeyboardResponder.swift
// MoveMAD
//
// Created by Adolfo Vera Blasco on 19/11/2019.
// Copyright © 2019 desappstre {eStudio}. All rights reserved.
//
import Combine
import SwiftUI
@fitomad
fitomad / KeyboardResponder.swift
Created Nov 22, 2019
Manage iOS keyboard presentation and dismiss with your SwiftUI views.
View KeyboardResponder.swift
//
// KeyboardResponder.swift
// MoveMAD
//
// Created by Adolfo Vera Blasco on 19/11/2019.
// Copyright © 2019 desappstre {eStudio}. All rights reserved.
//
import SwiftUI
View perfect_app_store_screenshot.sh
#!/bin/zsh
# The right time
xcrun simctl status_bar booted override --time 09:41
# WiFi & Cellular network
xcrun simctl status_bar booted override --dataNetwork wifi
xcrun simctl status_bar booted override --wifiBars 3
xcrun simctl status_bar booted override --cellularBars 4
# 100% battery level
xcrun simctl status_bar booted override --batteryLevel 100
View frozen_struct.swift
@frozen public struct Castillo
{
/// La propietaria del castillo
public var moradora: Princesa
/// La superficie (habitable) del castillo
public var metrosCuadrados: Int
/**
Nuevo castillo para la princesa del universo Frozen
*/
View frozen_test_with_attribute.swift
let index = Int.random(in: 0 ..< Princesa.allCases.count)
switch Princesa.allCases[index]
{
case .elsa:
print("Elsa")
case .anna:
print("Anna")
}
View frozen_enum_with_attribute.swift
@frozen public enum Princesa: CaseIterable
{
case elsa
case anna
}
View frozen_princesa_extended.swift
public enum Princesa: CaseIterable
{
case elsa
case anna
case olivia
case valeria
}
View frozen_client_1.swift
let index = Int.random(in: 0 ..< Princesa.allCases.count)
switch Princesa.allCases[index]
{
case .elsa:
print("Elsa")
case .anna:
print("Anna")
@unknown default:
print("Por si hacen Frozen 3 y aparece una nueva princesa")
@fitomad
fitomad / SwiftUI_async_image_loading.swift
Last active Apr 22, 2020
A SwiftUI example about async image loading.
View SwiftUI_async_image_loading.swift
//
// ImageLoader.swift
// DubDubKit
//
// Created by Adolfo Vera Blasco on 27/06/2019.
// Copyright © 2019 Adolfo Vera Blasco. All rights reserved.
//
#if os(macOS)
import AppKit
You can’t perform that action at this time.