Skip to content

Instantly share code, notes, and snippets.

View pawelkijowskizimperium's full-sized avatar
📱

Pawel Kijowski pawelkijowskizimperium

📱
View GitHub Profile
@pawelkijowskizimperium
pawelkijowskizimperium / desym
Created April 29, 2019 12:15
Symbolicate iOS crash logs
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
symbolFile=${1}
shift
while test ${#} -gt 0
do
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash "${1}" "${symbolFile}" > "${1}.txt"
shift
done
@pawelkijowskizimperium
pawelkijowskizimperium / ViewController.swift
Created February 6, 2019 18:09
TableView With Dynamic Sections
//
// ViewController.swift
// TableViewWithDynamicSections
//
// Created by Pawel Kijowski on 2/6/19.
// Copyright © 2019 Pawel Kijowski. All rights reserved.
//
import UIKit
@pawelkijowskizimperium
pawelkijowskizimperium / digitalRoot.swift
Last active December 10, 2018 02:20
Efficient digital root
import UIKit
func digitalRoot(of number: Int) -> Int {
if (number <= 0) {
return number
} else if (number % 9 == 0) {
return 9
} else {
return number % 9
}