Skip to content

Instantly share code, notes, and snippets.

Checklist for adding Swift support to Objc project

  1. Add (auto-generated) bridging header ProductName-Bridging-Header.h.
  2. Add SWIFT_VERSION to Build Settings -> Swift Compiler - Language.
  3. Fix Multiple commands produce '.../Objects-normal/x86_64/ProductName.swiftmodule' - target ProductNames should differ.
  4. Set "Defines Modules" to "Yes" in Build Settings -> Packaging.
  5. #import "Objective-C Generated Interface Header Name"
  6. Remove #import "ProductName-Swift.h" from headers to implementation, add forward declaration to headers.

The "rules" of converting Swift names to Objc

Flask

run Flask in a folder with app.py, preferrably in virtualenv

python -m flask run

kill Flask process after insufficient Ctrl + C

ps -ef | grep flask - shows all flask processes

sudo lsof -i :5000 - shows all processes running at port 5000

✅ = it works

Пункт збору гуманітарної допомоги

працюватиме щоденно (пн-пт) з 10.00 до 18.00 год. за адресою: вул. Театральна, 10, 2-й поверх, приміщення Львівського міського центру соціальних служб для сім’ї, дітей та молоді. Перш ніж принести допомогу, просять зателефонувати на номер «гарячої лінії» 0−800−301−205.

Благодійний фонд «Здійснити мрію»: старі люди + сироти

Номер картки «ПриватБанку» для благодійних пожертв: 5168757375500164 на Флишко Уляну.

1. Визначити правила проектування багатопоточного інтерфейсу і робити code review після кожного коміту.
a. Що є моїми даними які я захищаю?
b. Що є інваріантами для цих даних?
c. Чи всі інваріанти збережено після операцій над даними?
d. Чи mutex захищає всі важливі дані?
e. Чи mutex не захоплює важких н-д IO-операцій?
f. Чи немає sleep-ів?
2. Мати набір простих і складних тестових сценаріїв, тестувати шляхом перевірки логера і файлів на диску.
3. Знати механізми багатопоточності в C++ і застосовувати їх оптимально.
1. Understand the current state of your codebase.
2. Identify problems you'd like to solve or code you'd like to improve.
3. Evaluate different architecture patterns.
4. Try a couple patterns on for size before committing to one.
5. Draw a line in the sand and define your app's baseline architecture.
6. Look back and determine if your architecture is effectively addressing the problems you want to solve.
7. Iterate and evolve your app’s architecture over time.
hdiutil create -size 10m -fs HFS+ /tmp/app-storage-test.dmg
hdiutil attach /tmp/app-storage-test.dmg -mountpoint /Users/olia/Library/Developer/CoreSimulator/Devices/24CDF2E0-CA88-4D43-B4DD-18F511802259/data/Containers/Data/PluginKitPlugin/E64CEF54-177B-4D7D-910B-2F0946FE449B/tmp/sessions
diskutil list
hdiutil detach disk2s1
diskutil eraseDisk HFS+ untitled /dev/disk2
@gatamar
gatamar / mac_os_setup.txt
Last active September 20, 2019 10:44
Application I need to start work on my Mac
1. Install system update
5. Download Xcode
2. Slack
3. SourceTree
4. Copy .ssh via AirDrop
6. Clone all projects with --recurse-submodules
7. Sublime Text 3
8. Set up Mail
9. Notion
10. CocoaPods
name ring quadrant isNew description
RxSwift trial language-and-frameworks FALSE It will be useful for better bug-free asynchronous code for iOS
Sourcery assess tools TRUE https://github.com/krzysztofzablocki/Sourcery
iOS adopt platforms FALSE test
GraphQL assess language-and-frameworks TRUE https://www.raywenderlich.com/595-getting-started-with-graphql-apollo-on-ios
OpenGL hold language-and-frameworks FALSE It's legacy, and I'm not interested in GPU-related stuff now.
Metal adopt language-and-frameworks TRUE It's used in my company's current projects
MVVM assess techniques TRUE Well-known architecture approach
ELM programming lang assess language-and-frameworks TRUE unidirectional architecture; Redux etc
Stencil template lang assess language-and-frameworks TRUE Swift ecosystem