Skip to content

Instantly share code, notes, and snippets.

View helbertgs's full-sized avatar
🏠
Working from home

Helbert Gomes helbertgs

🏠
Working from home
  • Waterloo, Ontario - CA
  • 23:21 (UTC -04:00)
  • X @helbertgs
View GitHub Profile
@chriseidhof
chriseidhof / ContentView.swift
Last active March 27, 2024 19:14
Variadic Views
import SwiftUI
struct MyValue: _ViewTraitKey {
static var defaultValue: Int = 0
}
extension View {
func myValue(_ value: Int) -> some View {
_trait(MyValue.self, value)
}
@Cosmo
Cosmo / SwiftUI Interface.swift
Created November 15, 2019 08:26
SwiftUI Interface (Module Names removed)
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.1.1 (swiftlang-1100.2.274.2 clang-1100.2.32.1)
// swift-module-flags: -target arm64e-apple-ios13.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name SwiftUI
import Combine
import CoreData
import CoreFoundation
import CoreGraphics
import CoreText
import Darwin
import Foundation
@shalomsam
shalomsam / morse-code-possibilities.js
Created February 13, 2019 06:17
Given 3 morse code characters determines the letter associated with it. Any of the morse can be substituted for ? and this code will respond with possibilities
function possibilities (signals) {
var atoms = {
".": "E",
"-": "T",
"I": {
".": "S",
"-": "U"
},
"A": {
".": "R",
@pogramos
pogramos / Fastfile
Created August 17, 2018 17:01
Custom fastfile lanes
# Customize this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@WorldDownTown
WorldDownTown / ExtensionCompatibleSample.swift
Last active March 5, 2022 03:10
An example of Extension based on RxSwift in Swift.
public struct Extension<Base> {
public let base: Base
public init(_ base: Base) {
self.base = base
}
}
public protocol ExtensionCompatible {
associatedtype Compatible
var ex: Extension<Compatible> { get set }
@Ben-G
Ben-G / DynamicInit.swift
Last active May 27, 2023 13:30
Dynamically create instance based on type in Swift
protocol Initializable {
init()
}
class A : Initializable {
var content:String
required init() {
content = "TestContent"
}
@erikhenrique
erikhenrique / bin-cc.md
Last active June 30, 2024 22:14
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3