Skip to content

Instantly share code, notes, and snippets.

View alanzeino's full-sized avatar
🐱
cat

Alan Zeino alanzeino

🐱
cat
View GitHub Profile
static UICollectionViewListCell *userCell(UICollectionView *collectionView, NSIndexPath *indexPath, NSArray<RTTweet *> *tweets) {
UICollectionViewListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"UserCell" forIndexPath:indexPath];
UIListContentConfiguration *contentConfiguration = [UIListContentConfiguration valueCellConfiguration];
contentConfiguration.image = nil;
RTTweet *tweet = tweets[indexPath.row];
contentConfiguration.text = tweet.user.username;
contentConfiguration.secondaryText = [tweet.user.followers az_formattedStringForCount];
@alanzeino
alanzeino / new-mac.md
Last active April 10, 2024 23:02
New Mac Setup

All the stuff I do to set up a new Mac

Applications

  • 1Blocker
  • AirBuddy
  • Amphetamine
  • BlockBlock
  • DaisyDisk
  • Deliveries
  • Fantastical
  • HextEdit
@alanzeino
alanzeino / gist:e388864414e5c2c78f67b049b88948f8
Created November 6, 2018 20:55
Xcode 10.1 Release Notes Change
Before November 6:
"Resolves an issue that affected app compatibility with iOS 9.0, 9.1 and 9.2. Apps containing asset catalogs built with Xcode 10 whose deployment target was set to iOS 9.0, 9.1 or 9.2 would produce content incompatible with the runtimes of those iOS versions. Rebuilding the application with Xcode 10.1 resolves this issue. (44535967)"
After November 6:
"Known Issues
Apps that contain asset catalogs built using Xcode 10 or later with a deployment target set to iOS 9.0, 9.1 or 9.2 produce content incompatible with the runtimes of those iOS versions. (44535967, 45723580, 45723189)"
@alanzeino
alanzeino / gist:97676005e37e6d869401a5adb5777d76
Created October 21, 2018 05:46
Xcode 10 new clang flags
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
@alanzeino
alanzeino / codegen.swift
Last active October 26, 2018 20:53
swiftsyntax simple class/struct gen example
struct MockGenType {
let name: String
let isOptional: Bool
init(name: String, isOptional: Bool = false) {
self.name = name
self.isOptional = isOptional
}
func libRepresentation(hasDefault: Bool = false) -> OptionalTypeSyntax {
@alanzeino
alanzeino / IDEWorkspaceChecks.plist
Created April 4, 2018 21:37
IDEWorkspaceChecks.plist in 9.3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@alanzeino
alanzeino / gist:0a421075385408fb71032eba7bef518f
Created August 7, 2017 18:10
Xcode Post–Upgrade Clean
$ sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode \
rm -rf ~/Library/Developer/Xcode/DerivedData \
sudo rm -rf "$(getconf DARWIN_USER_CACHE_DIR)org.llvm.clang.$USER/ModuleCache" \
sudo /usr/libexec/xpccachectl
//
// SwiftVersionSourceEditorCommand.swift
// WrapperExtension
//
// Created by Alan Zeino on 7/25/17.
// Copyright © 2017 Alan Zeino. All rights reserved.
//
import Foundation
import XcodeKit
//
// OurCache.swift
// ConflictingSymbolsViaProtocolExtensions
//
// Created by Alan Zeino on 7/19/17.
// Copyright © 2017 Alan Zeino. All rights reserved.
//
import Foundation
CollectionView.swift:111:24: error: method does not override any method from its superclass
open override func performBatchUpdates(_ updates: (() -> Void)?, completion: ((Bool) -> Void)? = nil) {
^
UIKit.UICollectionView:122:15: note: potential overridden instance method 'performBatchUpdates(_:completion:)' here
open func performBatchUpdates(_ updates: (() -> Swift.Void)?, completion: ((Bool) -> Swift.Void)? = nil)