Skip to content

Instantly share code, notes, and snippets.

View alanzeino's full-sized avatar
🐱
cat

Alan Zeino alanzeino

🐱
cat
View GitHub Profile
@alanzeino
alanzeino / gist:1513216
Created December 23, 2011 05:14
Zoom and Fade effect on UIView
// where 'syncLabel' is a UILabel
[UIView animateWithDuration:0.2
delay:0.0
options:0
animations:^{
self.syncLabel.alpha = 0.2;
self.syncLabel.transform = CGAffineTransformMakeScale(3.0,3.0);
}
completion:^(BOOL finished) {
self.syncLabel.alpha = 1.0;
@alanzeino
alanzeino / NSArray+YOLO.m
Created March 19, 2013 01:17
firstObject category for NSArray
@implementation NSArray (YOLO)
- (id)firstObject
{
if (self.count)
return [self objectAtIndex:0];
return nil;
}
@end
#!/usr/bin/env ruby
require 'yaml'
def find_value_for_key(yaml_file, key)
yaml_file.each do |yaml_key, yaml_value|
if key == yaml_key
return yaml_value
end
end
#!/usr/bin/env ruby
require 'yaml'
def find_value_for_key(yaml_file, key)
yaml_file.each do |yaml_key, yaml_value|
if key == yaml_key
return yaml_value
end
end
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)
//
// OurCache.swift
// ConflictingSymbolsViaProtocolExtensions
//
// Created by Alan Zeino on 7/19/17.
// Copyright © 2017 Alan Zeino. All rights reserved.
//
import Foundation
//
// SwiftVersionSourceEditorCommand.swift
// WrapperExtension
//
// Created by Alan Zeino on 7/25/17.
// Copyright © 2017 Alan Zeino. All rights reserved.
//
import Foundation
import XcodeKit
@alanzeino
alanzeino / LinkedList.swift
Created October 7, 2016 18:42
A simple LinkedList in Swift 3 using Sequence and IteratorProtocol
//: Playground - noun: a place where people can play
import Foundation
class Node {
let value: Any
var next: Node?
init(value: Any, next: Node?) {
@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: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;