Skip to content

Instantly share code, notes, and snippets.

View dudarenko-io's full-sized avatar

Ilya Dudarenko dudarenko-io

View GitHub Profile
@dive
dive / modularisation_consequences_funcorp.md
Last active June 26, 2020 14:23
Links & Additional information for the talk

Катастрофически полезные последствия модуляризации в мире iOS и непрерывной интеграции

Tools

  • Xcodegen - a Swift command line tool for generating your Xcode project;
  • XcodeProj - read, update and write your Xcode projects;
  • XCLogParser - tool to parse xcactivitylog by Spotify;

General

  • Что такое "Project Purple"?
  • Каких Русских/Иностранных iOS программистов/медийных личностей вы знаете? (Steve Voznyak, Chris Eidhof, Florian Kugler, Mattt Thompson, Ray Wenderlich, Егор Толстой, Андрей Панов, Александр Зимин)
  • Какие сайты читаете?
  • NSRunLoop: что это? как работает? для чего нужно?
  • Что такое UIApplication? UIApplication delegate? Каким образом вызываются методы делегата?
@ilyapuchka
ilyapuchka / Export in Paw.workflow
Last active December 22, 2017 19:38
Export to Paw automation script
// First make sure that you have granted access to Automator, Xcode and Paw in accessibility section in Security & Privacy settings.
// Then create a new Service workflow in Automator with following actions:
1. Copy to clipboard
2. Launch Application: "Paw"
3. Run AppleScript:
tell application "System Events"
tell process "Paw"
click menu item "Text" of menu 1 of menu item "Import" of menu 1 of menu bar item "File" of menu bar 1
// Swift's untyped errors are a goddam PiTA. Here's the pattern I use to try to work around this.
// The goal is basically to try to guarantee that every throwing function in the app throws an
// ApplicationError instead of some unknown error type. We can't actually enforce this statically
// But by following this convention we can simplify error handling
enum ApplicationError: Error, CustomStringConvertible {
// These are application-specific errors that may need special treatment
case specificError1
case specificError2(SomeType)
@chriseidhof
chriseidhof / references.swift
Last active October 14, 2021 10:24
References Blogpost
//: Playground - noun: a place where people can play
import Foundation
final class Disposable {
private let dispose: () -> ()
init(_ dispose: @escaping () -> ()) {
self.dispose = dispose
}
@haruair
haruair / pre-commit-swiftlint.sh
Created December 5, 2016 13:25
Git Client-side pre-commit hook for SwiftLint
#!/bin/bash
#
# hook script for swiftlint. It will triggered when you make a commit.
#
# If you want to use, type commands in your console.
# $ ln -s ../../pre-commit-swiftlint.sh .git/hooks/pre-commit
# $ chmod +x .git/hooks/pre-commit
LINT=$(which swiftlint)
@Gurdeep0602
Gurdeep0602 / AppStoryboard.swift
Last active April 2, 2024 09:54
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
@shto
shto / NSManagedObject+Cloner.h
Last active April 20, 2018 04:53
NSManagedObject cloner files
#import <CoreData/CoreData.h>
@interface NSManagedObject (Cloner)
- (NSManagedObject *)clone;
- (NSManagedObject *)cloneInContext:(NSManagedObjectContext *)differentContext;
@end
@steipete
steipete / PSPDFThreadSafeMutableDictionary.m
Last active January 20, 2025 07:33
Simple implementation of a thread safe mutable dictionary. In most cases, you want NSCache instead, but it can be useful in situations where you want to manually control what is evicted from the cache in low memory situations.**Warning:** I only use this for setting/getting keys. Enumeration is not thread safe here and will still throw exception…
//
// PSPDFThreadSafeMutableDictionary.m
//
// Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@adamgit
adamgit / .gitignore
Last active March 20, 2025 10:01
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#