Skip to content

Instantly share code, notes, and snippets.

View anatoliykant's full-sized avatar

Anatolii Kant anatoliykant

  • Belgrade
View GitHub Profile
do {
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
let data = try encoder.encode(sampleInput)
if let jsonString = String(data: data, encoding: .utf8) {
print(jsonString)
}
} catch {
#!/bin/sh
# make sure you have imagemagick installed: brew install imagemagick
# your app_icons.sh file should have the correct permissions: run `chmod 775 app_icons.sh` in your terminal from where you put this file
# put your `my_icon.png` next to this file and run ./app_icons.sh to export your app icons
x=my_icon.png
y=${x%.*}
# delete the export directory so we start clean
@Noluk1991
Noluk1991 / Устройство многопоточности в iOS (Podlodka iOS Crew. Season 3)
Last active July 11, 2024 10:37
Дополнительные материалы к докладу
// Разное интересное по многопоточности:
// Featured-секция, для любителей архивной документации от Apple:
1. https://developer.apple.com/library/archive/technotes/tn/tn2028.html#//apple_ref/doc/uid/DTS10003065 - про внутренности потоков в MAC OS X в сравнении с MAC OS 9
2. https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/About/About.html - Kernel Programming guide, вы же понимаете, что там будет, да :D
// Для любителей WWDC:
1. https://developer.apple.com/videos/play/wwdc2015/718/ - GCD раз.
#-------------------------------------------------------------------------------
# CocoaPods
#-------------------------------------------------------------------------------
function pods_install() {
red="\001$(tput setaf 1)\002"
yellow="\001$(tput setaf 3)\002"
green="\001$(tput setaf 2)\002"
reset="\001$(tput sgr0)\002"
if [ "$1" = "-f" ] ; then
@dive
dive / modularisation_consequences_funcorp.md
Last active June 26, 2020 14:23
Links & Additional information for the talk

Катастрофически полезные последствия модуляризации в мире iOS и непрерывной интеграции

Tools

  • Xcodegen - a Swift command line tool for generating your Xcode project;
  • XcodeProj - read, update and write your Xcode projects;
  • XCLogParser - tool to parse xcactivitylog by Spotify;
It's been a while since this gist was written. In the meantime the package homeassistant-supervised apt
package was introduced for debian based systems. If you used that way the first thing you should do use
the normal package uninstaller with something like: (sudo) apt remove homeassistant-supervised
If for some reason that doesn't work proceed with the below instructions for a manual cleanup.
1) stop services:
sudo systemctl stop hassio-supervisor.service
sudo systemctl stop hassio-apparmor.service
2) disable services:
@Amzd
Amzd / Binding+didSet.swift
Last active September 20, 2023 05:27
SwiftUI Binding wrappers for willSet and didSet
extension Binding {
/// Wrapper to listen to didSet of Binding
func didSet(_ didSet: @escaping ((newValue: Value, oldValue: Value)) -> Void) -> Binding<Value> {
return .init(get: { self.wrappedValue }, set: { newValue in
let oldValue = self.wrappedValue
self.wrappedValue = newValue
didSet((newValue, oldValue))
})
}
@kamermanpr
kamermanpr / install-xcodeCLT-homebrew-git.md
Last active November 9, 2023 17:50
Install Xcode Command Line Tools, Homebrew, and Git on macOS

Install Xcode command line tools, Homebrew, and Git on macOS

Install the following apps on your mac running macOS:

  1. (standalone) Xcode Command Line Tools
  2. Homebrew
  3. Git

Modified from: https://www.moncefbelyamani.com

@SheldonWangRJT
SheldonWangRJT / WWDC18-416.md
Last active May 17, 2024 10:09
WWDC18 Notes by Sheldon - Session 416 - iOS Memory Deep Dive

WWDC18 Notes - Session 416 - iOS Memory Deep Dive

All session list link: Here
Session Link: Here
Demo starts @ 25:30 in the video.
Download session slides: Here

This notes is written by Sheldon after watching WWDC18 session 416. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

@skabber
skabber / exportOptions.plist
Last active July 5, 2024 18:22
Export Options Plist Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>uploadBitcode</key>
<true/>