Skip to content

Instantly share code, notes, and snippets.

View impul's full-sized avatar
🎯
Focusing

Pavlo Boiko impul

🎯
Focusing
  • Ukraine, Uzhhorod/Remote
View GitHub Profile
//
// MnemonicPhraseCopyViewController.swift
// ImpulseWallet
//
// Created by Pavlo Boiko on 20.07.18.
// Copyright © 2018 Impulse. All rights reserved.
//
import UIKit
import ImpCore
import ImpUI
@impul
impul / string.swift
Created January 20, 2020 14:04
Swift text height calculation
import UIKit
import XCTest
import PlaygroundSupport
extension String {
func height(withWidth width: CGFloat, font: UIFont) -> CGFloat {
let linesToCalculate = components(separatedBy: "\n")
var textHeight: CGFloat = 0
linesToCalculate.forEach { string in
let maxSize = CGSize(width: width, height: CGFloat.greatestFiniteMagnitude)
@impul
impul / erc20update
Last active December 10, 2019 07:41
{"update": 1575963599}
@impul
impul / erc20
Last active November 16, 2023 03:03
[{"symbol": "WETH", "decimals": 18, "name": "Wrapped Ether", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}, {"symbol": "DAI", "decimals": 18, "name": "DAI", "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"}, {"symbol": "HGT", "decimals": 8, "name": "HelloGold Token", "address": "0xba2184520a1cc49a6159c57e61e1844e085615b6"}, {"symbol": "BRM", "decimals": 18, "name": "BrahmaOS", "address": "0xd7732e3783b0047aa251928960063f863ad022d8"}, {"symbol": "USDT", "decimals": 6, "name": "Tether USD", "address": "0xdac17f958d2ee523a2206206994597c13d831ec7"}, {"symbol": "BAT", "decimals": 18, "name": "Basic Attention Token", "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef"}, {"symbol": "BBT", "decimals": 18, "name": "Bao Bao Token", "address": "0x2d0ea9f9591205a642eb01826ba4fa019eb0efc6"}, {"symbol": "MKR", "decimals": 18, "name": "Maker", "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2"}, {"symbol": "PTT", "decimals": 18, "name": "Proton Token", "address": "0x4689a4e169eb39cc9078c0940e21ff1
@impul
impul / Makefile
Created May 13, 2018 16:27 — forked from oleander/Makefile
How to use the Swift Package Manager and CocoaPods within the same XCode application
APP="MyApp"
CONSTRUCT=xcodebuild -workspace $(APP).xcworkspace -scheme $(APP) clean
install_deps:
pod install
create_config:
swift package fetch
swift package generate-xcodeproj
wipe:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
@impul
impul / Map
Last active July 27, 2017 06:07
Refactor
// MARK: - IBActions
@IBAction func zoomInButtonTaped(_ sender: UIButton) {
Zoom.In.at(self.mapView)
}
@IBAction func zoomOutButtonTaped(_ sender: UIButton) {
Zoom.Out.at(self.mapView)
}