Skip to content

Instantly share code, notes, and snippets.

View perseusrealdeal's full-sized avatar
focusing on

Mikhail A. Z. perseusrealdeal

focusing on
  • Siberia lifer, Novosibirsk native.
  • Novosibirsk
  • 06:56 (UTC +07:00)
View GitHub Profile
@perseusrealdeal
perseusrealdeal / CurrentSystemLanguageGift.swift
Last active January 28, 2024 22:27
The code of the current system language.
//
// CurrentSystemLanguageGift.swift
// Gifts
//
// Just a gift. Tested with Swift 4.2 compiler.
// https://gist.github.com/perseusrealdeal/98b082b136d574dd1b5aa760036dac8b
//
/* Perseus Logger source code */
/* https://gist.github.com/perseusrealdeal/df456a9825fcface44eca738056eb6d5 */
@perseusrealdeal
perseusrealdeal / JsonDataDictionaryGift.swift
Last active March 3, 2024 11:54
Json Data to [String: Any]. Give it a path by closure.
//
// JsonDataDictionaryGift.swift
// Gifts
//
// Just a gift. Tested with Swift 4.2 compiler.
// https://gist.github.com/perseusrealdeal/918c25633122e64d51f363f00059f6f8
//
/* Perseus Logger source code */
/* https://gist.github.com/perseusrealdeal/df456a9825fcface44eca738056eb6d5 */
@perseusrealdeal
perseusrealdeal / JsonDataPrettyPrintedGift.swift
Last active January 15, 2024 10:46
Pretty printed Json Data object as a NSString.
//
// JsonDataPrettyPrintedGift.swift
// Gifts
//
// Just a gift, tested with Swift 4.2 compiler.
// https://gist.github.com/perseusrealdeal/945c9050cb9f7a19e00853f064acacca
//
/* Perseus Logger source code */
/* https://gist.github.com/perseusrealdeal/df456a9825fcface44eca738056eb6d5 */
@perseusrealdeal
perseusrealdeal / PerseusCompassDirection.swift
Last active January 12, 2024 16:45
Home-made Swift compass. Use it to know cardinal point by wind degree.
//
// PerseusCompassDirection.swift
// PerseusRealDeal
//
// Created by Mikhail Zhigulin in 7532.
//
// Copyright © 7532 Mikhail Zhigulin of Novosibirsk.
// Copyright © 7532 PerseusRealDeal.
// All rights reserved.
//
@perseusrealdeal
perseusrealdeal / PerseusTimeFormat.swift
Last active January 11, 2024 19:40
Home-made Swift time format explorer. It's either 24-hour or 12-hour.
//
// PerseusTimeFormat.swift
// PerseusRealDeal
//
// Created by Mikhail Zhigulin in 7532.
//
// Copyright © 7532 Mikhail Zhigulin of Novosibirsk.
// Copyright © 7532 PerseusRealDeal.
// All rights reserved.
//
@perseusrealdeal
perseusrealdeal / PerseusLogger.swift
Last active April 18, 2023 17:03
Home-made Swift logger. Use it like a variable anywhere you want.
//
// PerseusLogger.swift
// PerseusRealDeal
//
// Created by Mikhail Zhigulin in 7531.
//
// Copyright © 7531 Mikhail Zhigulin of Novosibirsk.
// Copyright © 7531 PerseusRealDeal.
// All rights reserved.
//
@perseusrealdeal
perseusrealdeal / SwiftCompilerDirectives.md
Last active April 22, 2023 06:23
Swift compiler directives.
#if canImport(UIKit)
import UIKit
#elseif canImport(Cocoa)
import Cocoa
#endif
#if DEBUG
@perseusrealdeal
perseusrealdeal / UnitTestingTerms.md
Last active April 21, 2023 06:47
Coming to terms with unit testing.

Unit testing is a complementary process to the development process.

Types: Unit Test / Integration Test / Performance Test / UI test

List of driving questions:

  • Are you making sure of it (sense)?

  • Are you sure?

  • Does it make sense?

@perseusrealdeal
perseusrealdeal / TopDevTerms.md
Last active April 21, 2023 06:33
Coming to terms with developer perspective.

Boat or ship is a piece of something or a whole that a developer can drive, some component or app.

Most In Use:

  • Clean Code (KISS, DRY, and YAGNI)
  • Pure Functions
  • Dependency Injection (DI)
  • SOLID
  • Design Patterns (Singleton, Facade, Decorator, and Factory)
  • Architecture (MVC, MVP, MVVM, and VIPER)
@perseusrealdeal
perseusrealdeal / HowToDeployLibWithCocoaPods.md
Last active April 21, 2023 07:39
How to deploy a library with CocoaPods.

Step 1: Make shure that session is registered.

$ pod trunk me

Step 2: Start session if not registered.

$ pod trunk register orta@cocoapods.org 'Orta Therox' --description='macbook pro'