Skip to content

Instantly share code, notes, and snippets.

View MMnasrabadi's full-sized avatar
🤠
i am happy

Mohammad Mohammadi Nasrabadi MMnasrabadi

🤠
i am happy
View GitHub Profile
@MMnasrabadi
MMnasrabadi / gist:4b256d2ab2af7257210911a99cd77a9c
Last active June 13, 2024 16:02
GitKraken open Private Repository
Installing older version of Gitkraken is the only solution I guess to work on private repo if you want it for free and without student developer pack.
From the release notes, the last version to support private repo is v6.5.1.
@MMnasrabadi
MMnasrabadi / DocumentPicker.swift
Created December 16, 2020 15:39 — forked from aheze/DocumentPicker.swift
UIDocumentPickerViewController example in Swift 5. Bug fixed version of this article: https://medium.com/flawless-app-stories/a-swifty-way-to-pick-documents-59cad1988a8a
//
// DocumentPicker.swift
import UIKit
import MobileCoreServices
protocol DocumentDelegate: class {
func didPickDocument(document: Document?)
}
// clean remore memory leak
protocol Weakifiable: class { }
extension NSObject: Weakifiable {}
extension Weakifiable {
func weakify<T, Z>(_ code: @escaping (Self, T) -> Z) -> (T) -> Z? {
return { [weak self] data in
guard let self = self else { return nil}
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
@MMnasrabadi
MMnasrabadi / EntryPoint.swift
Created July 8, 2024 06:25 — forked from IanKeen/EntryPoint.swift
Example main.swift
import Foundation
import SwiftUI
let isUITesting = /* your UI test detection here */
@main
struct EntryPoint {
static func main() {
if isUITesting {
UITestApp.main()