Skip to content

Instantly share code, notes, and snippets.

View bocato's full-sized avatar

Eduardo Bocato bocato

View GitHub Profile
@digitaljhelms
digitaljhelms / gist:4287848
Last active June 11, 2024 22:12
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@paulrehkugler
paulrehkugler / gist:9647085
Created March 19, 2014 17:37
Default Protocol Method Implementation in Objective-C
// SomeProtocol.h
@protocol SomeProtocol <NSObject>
- (void) protocolMethod;
@end
// NSObject+SomeProtocolDefaultImplementation.h
@interface NSObject(SomeProtocolDefaultImplementation)
@mattt
mattt / regex.swift
Created August 11, 2014 18:08
Creating a regular expression object from a String literal
class Regex {
let pattern: String
let options: NSRegularExpressionOptions!
private var matcher: NSRegularExpression {
return NSRegularExpression(pattern: self.pattern, options: nil, error: nil)
}
required init(pattern: String, options: NSRegularExpressionOptions = nil) {
self.pattern = pattern
@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"
}
@youzi
youzi / milestones.sh
Last active May 19, 2021 15:14
Create milestone and labels script
#!/bin/bash
echo -n "GitHub User: "
read USER
echo -n "GitHub Password: "
read -s PASS
echo ""
echo -n "GitHub Repo (e.g. foo/bar): "
//
// ProgrammerAssertions.swift
// Assertions
//
// Created by Mohamed Afifi on 12/20/15.
// Copyright © 2015 mohamede1945. All rights reserved.
//
import Foundation
@pyrtsa
pyrtsa / AnyEquatable.swift
Created May 25, 2016 10:27
AnyEquatable—making Equatable work with class inheritance and existential wrapping ("type erasure")
// Toggle this boolean to compare against stdlib:
#if true // Stdlib version
// Quick hack to avoid changing the AnyEquatable implementation below.
extension Equatable { typealias EqualSelf = Self }
#else // Modified version
protocol Equatable {
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# 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
//
// DateFormatTransform.swift
//
// Created by Rodolfo Antonici on 29/11/16.
// No copyright, just use it as it's.
// ObjectMapper version 2.2
//
// A simple class using the TransformType protocol of ObjectMapper to convert Date String into a NSDate object
import Foundation
//
// InputAccessoryView.swift
//
// Created by Rodolfo Antonici on 23/08/16.
// Copyright © 2016 RAntonici. All rights reserved.
//
import UIKit
class InputAccessoryView: UIView {