Skip to content

Instantly share code, notes, and snippets.

View userow's full-sized avatar

Pavlo Vasylenko userow

View GitHub Profile
@userow
userow / Test-CountryCellView.swift
Created May 13, 2023 10:11
TableViewCell of test task with Stack issues
class CountryCellView: UITableViewCell {
// MARK: - Declarations. Private
// MARK: UI elements
private let _labelName = UILabel()
private let _labelFlag = UILabel()
private let _labelCode = UILabel()
private let _stackV = UIStackView()
private let _stackH = UIStackView()
let jsonString =
"""
{"meta":{"code":200,"message":"0K","request_time":1660720775,"limit":4,"total":4,"offset":0,"resource":"https://api.eldorado.ua/v1/promotions_tags?get_promo_by_goods=&goods_ids=1750438&lang=ua&outputPosition=product"},"data":[{"tag_id":"45526344","good_id":"1750438","promotion_id":"7373","tag_name":"+1 \\u0440\\u0456\\u043a \\u0437\\u0430\\u043c\\u0456\\u043d\\u0430 \\u0435\\u043a\\u0440\\u0430\\u043d\\u0443 \\u0434\\u043b\\u044f \\u043d\\u043e\\u0432\\u0438\\u0445 Galaxy","is_promo_code":"0","promo_code_nn":null,"small_description":null,"promotion_algorithm":"16","discount_type":"\\u0414\\u0435\\u043d\\u044c\\u0433\\u0438","promotion_setting_id":"10995","operation_type":"\\u041d\\u0438\\u0447\\u0435\\u0433\\u043e","price_discount":"0","key_set":"0","output_order":"3","image_url":"promotions_tags_images/868-1660308223.svg","image_name":"868","payment_count":"0","priority":"3","title":"1 \\u0440\\u0456\\u043a \\u0437\\u0430\\u043c\\u0456\\u043d\\u0430 \\u0435\\u043a\\u0440\\u0430\\u043d\\u
//
// TestMapAppApp.swift
// TestMapApp
//
// Created by Pavlo Vasylenko on 21.03.2022.
//
import SwiftUI
import Foundation
import MapKit
@userow
userow / Mac Home and Keychain fixes
Last active June 24, 2021 11:13
Issues fix after SSD moved from one MBP to another
https://discussions.apple.com/thread/8434674
!!! change ownership and access rights
cd ~
sudo chmod -R u+w .
sudo chown -R $(whoami) .
!!! when KeyChain is buggy
class MainScreen extends StatelessWidget {
void handlePopupClick(BuildContext context, num value) {
switch (value) {
case 0:
RepositoryProvider.of<AuthenticationRepository>(context).logOut();
break;
}
}
@override
flutter doctor -v
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
resolution:
https://github.com/flutter/flutter/issues/68429
@userow
userow / Brewfile
Last active August 21, 2021 09:35
tap "adoptopenjdk/openjdk"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "vapor/tap"
tap "yonaskolb/swaggen", "https://github.com/yonaskolb/SwagGen.git"
brew "aria2"
brew "asdf"
brew "bartycrouch"
public enum Color: UInt32, ColorRepresentable {
case secondary = 0x9B9B9B
case accent = 0x0083C1
case success = 0x7ED321
public enum Complete: UInt32, ColorRepresentable {
case background = 0x374162
}
}
open ~/Library/Mobile\ Documents/iCloud~com~apple~iBooks/
sudo spctl --master-disable