This login notifier uses IP information to send silent telegram notifications if the login source seem to be trustable.
First, please read this awesome Medium tutorial on how to setup the Telegram bot.
FactoryBot.define :stripe_customer, class: Hash do | |
skip_create | |
initialize_with { new(attributes) } | |
id { "cus_#{SecureRandom.hex(7)}" } | |
object { "customer" } | |
address { nil } | |
balance { 0 } | |
created { 1.day.ago.to_i } | |
currency { "usd" } |
This login notifier uses IP information to send silent telegram notifications if the login source seem to be trustable.
First, please read this awesome Medium tutorial on how to setup the Telegram bot.
import SwiftUI | |
// Note: There are some issues with using these modifiers inside of ButtonStyles on macOS. Please see https://twitter.com/noahsark769/status/1288256379640139776?s=20 for more info. | |
struct ConditionalContent<TrueContent: View, FalseContent: View>: View { | |
let value: Bool | |
let trueContent: () -> TrueContent | |
let falseContent: () -> FalseContent | |
@ViewBuilder var body: some View { |
-----BEGIN PUBLIC KEY----- | |
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlxrwmuYSAsTfn+lUu4go | |
ZSXBD9ackM9OJuwUVQHmbZo6GW4Fu/auUdN5zI7Y1dEDfgt7m7QXWbHuMD01HLnD | |
4eRtY+RNwCWdjNfEaY/esUPY3OVMrNDI15Ns13xspWS3q+13kdGv9jHI28P87RvM | |
pjz/JCpQ5IM44oSyRnYtVJO+320SB8E2Bw92pmrenbp67KRUzTEVfGU4+obP5RZ0 | |
9OxvCr1io4KJvEOjDJuuoClF66AT72WymtoMdwzUmhINjR0XSqK6H0MdWsjw7ysy | |
d/JhmqX5CAaT9Pgi0J8lU/pcl215oANqjy7Ob+VMhug9eGyxAWVfu/1u6QJKePlE | |
+wIDAQAB | |
-----END PUBLIC KEY----- |
// | |
// MultilineLabel.swift | |
// | |
// Created by Marcin Krzyzanowski on 19/09/2019. | |
// | |
import UIKit | |
public class MultilineLabel: UILabel { | |
override public init(frame: CGRect) { |
name | download_total | |
---|---|---|
AFNetworking | 61983241 | |
Fabric | 50998892 | |
Crashlytics | 49667729 | |
SDWebImage | 45471101 | |
Alamofire | 42097177 | |
CocoaLumberjack | 36071914 | |
Bolts | 35294870 | |
FirebaseInstanceID | 30277793 | |
FirebaseAnalytics | 30254593 |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
func makeGetCall() { | |
// Set up the URL request | |
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1" | |
guard let url = URL(string: todoEndpoint) else { | |
print("Error: cannot create URL") | |
return | |
} | |
let urlRequest = URLRequest(url: url) | |
// set up the session |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |
class TableViewController: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
tableView.delegate = self | |
tableView.dataSource = self | |
navigationItem.rightBarButtonItem = editButtonItem | |
} |