Skip to content

Instantly share code, notes, and snippets.

View jeksys's full-sized avatar

Eugene Yagrushkin jeksys

View GitHub Profile
@evnik
evnik / Framework2XCFramework.sh
Created December 30, 2020 20:23
This script allows to convert an iOS framework binary to XCFramework
# Copyright (c) 2020 Eugene Berdnikov
#
# 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
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@abhi21git
abhi21git / ExtensionURLRequest.swift
Last active February 19, 2024 12:23
Swift cURL Printer
//
// ExtensionURLRequest.swift
//
// Created by Abhishek Maurya on 16/07/20.
// Copyright © 2020. All rights reserved.
//
import Foundation
extension URLRequest {
@inket
inket / PreviewScreenshot.swift
Last active July 19, 2024 20:19
How to take screenshots of SwiftUI previews
#if DEBUG
import SwiftUI
private let screenshotDirectory = "/Users/inket/Desktop/"
struct PreviewScreenshot: ViewModifier {
struct LocatorView: UIViewRepresentable {
let tag: Int
func makeUIView(context: Context) -> UIView {
import PlaygroundSupport
import Foundation
struct Resource<A> {
var request: URLRequest
var parse: (Data) throws -> A
}
protocol Loadable {
static var request: URLRequest { get }
@kobeumut
kobeumut / SimpleParsingJson.swift
Created January 5, 2018 19:01
Simple Fetch Url and Parse Json on Swift 4 with codable and URLSession
func fetchResultsFromApi() {
struct MyGitHub: Codable {
let name: String?
let location: String?
let followers: Int?
let avatarUrl: URL?
let repos: Int?
private enum CodingKeys: String, CodingKey {
@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
}
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }
@mats-claassen
mats-claassen / UserInfoCell.swift
Last active September 29, 2021 13:39
Example of an Eureka custom row
//
// UserInfoCell.swift
//
// Created by Mathias Claassen on 30/8/16.
// Copyright © 2016 Xmartlabs. All rights reserved.
//
import Foundation
import Eureka
@fluffybeing
fluffybeing / System Design.md
Created April 18, 2016 06:31 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Interview Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?