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
  • 15:24 (UTC +07:00)
View GitHub Profile
@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 / MobileDevelopmentMachine.md
Last active January 29, 2024 18:03
How to set a Mac Machine up for mobile development.

Ambition: Rich the most popular devices on iOS and Android platforms.

Matter of fact:

  • Modern Xcode IDE doesn't contain SDK for early apple devices.
  • Supporting a wide range of iOS devices requires having different versions of Xcode IDE and in some cases macOS.

One way:

macHD Volume 1 > Install macOS High Sierra (10.13.6) with Xcode 10.1 and Android Studio Dolphin.

@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 / 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 / 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 / SwiftPackageWithCarthage.md
Last active April 21, 2023 07:44
How to install swift package with Carthage.

Cartfile contains:

github "perseusrealdeal/PerseusDarkMode" == 1.1.3
github "perseusrealdeal/PerseusUISystemKit" == 1.1.2

Step 1: $ carthage update

Step 2: $ (cd Carthage/Checkouts/PerseusDarkMode && swift package generate-xcodeproj)

@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'
@perseusrealdeal
perseusrealdeal / DeletingGitHubTags.md
Last active April 21, 2023 06:51
DeletingGitHubTags.

How to delete a remote Git tag on GitHub:

$ git push origin :refs/tags/<tag>

sample:

$ git push origin :refs/tags/1.1