Skip to content

Instantly share code, notes, and snippets.

@iamuzo
iamuzo / SelectionTableCell.swift
Created May 7, 2020 14:09 — forked from NeilsUltimateLab/SelectionTableCell.swift
SelectionViewController with multiple and single selection.
import UIKit
class SelectionTableCell: UITableViewCell {
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
}
required init?(coder aDecoder: NSCoder) {
@iamuzo
iamuzo / EnumExample.swift
Created April 8, 2020 18:03 — forked from JoshuaSullivan/EnumExample.swift
Don't use Swift enums to box magic strings! Read the blog post: http://www.chibicode.org/?p=16
enum NotificationNames: String {
case UserDataChanged: "UserDataChangedNotificationName"
case ReceivedAlert: "ReceivedAlertNotificationName"
case PeanutButterJellyTime: "ItsPeanutButterJellyTimeNotificationName"
}
@iamuzo
iamuzo / ios-cell-registration-swift.md
Created March 8, 2020 22:22 — forked from gonzalezreal/ios-cell-registration-swift.md
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.

Both UITableView and UICollectionView offer a similar API to register custom cell classes:

public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
@iamuzo
iamuzo / The Technical Interview Cheat Sheet.md
Created January 10, 2020 23:03 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.






\

@iamuzo
iamuzo / hash_deep_diff.rb
Created January 1, 2020 05:07 — forked from henrik/hash_deep_diff.rb
Recursively diff two Ruby hashes.
# Recursively diff two hashes, showing only the differing values.
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license.
#
# Example:
#
# a = {
# "same" => "same",
# "diff" => "a",
# "only a" => "a",
# "nest" => {
@iamuzo
iamuzo / Adaptive.sublime-theme
Created December 29, 2019 20:46 — forked from AbeEstrada/Adaptive.sublime-theme
Sublime Text 3 Adaptive Theme
[
// Hide sidebar tree icons
{
"class": "icon_file_type",
"content_margin": 0
},
{
"class": "icon_folder",
"content_margin": 0
},
@iamuzo
iamuzo / DependencyInjectionInRuby.md
Created December 24, 2019 21:30 — forked from blairanderson/DependencyInjectionInRuby.md
Dependency Injection in Ruby. Originally from Jim Weirich’s blog which does not exist except for googles cache.

Dependency Injection in Ruby 07 Oct 04

Introduction

At the 2004 Ruby Conference, Jamis Buck had the unenviable task to explain Dependency Injection to a bunch of Ruby developers. First of all, Dependency Injection (DI) and Inversion of Control (IoC) is hard to explain, the benefits are subtle and the dynamic nature of Ruby make those benefits even more marginal. Furthermore examples using DI/IoC are either too simple (and don’t convey the usefulness) or too complex (and difficult to explain in the space of an article or presentation). I once attempted to explain DI/IoC to a room of Java programmers (see onestepback.org/articles/dependencyinjection/), so I can’t pass up trying to explain it to Ruby developers.

Thanks goes to Jamis Buck (the author of the Copland DI/IoC framework) who took the time to review this article and provide feedback.

What is Dependency Injection?

~/Code/Learning/personal/firestore-codelab-extended-swift
› firebase --version
7.10.0

~/Code/Learning/personal/firestore-codelab-extended-swift
› firebase login
Already logged in as iamuzoagu@gmail.com

~/Code/Learning/personal/firestore-codelab-extended-swift