Skip to content

Instantly share code, notes, and snippets.

View aleksiy805's full-sized avatar

Oleksii Nikolaiev aleksiy805

View GitHub Profile
@ethanhuang13
ethanhuang13 / FacebookAuth.swift
Last active March 28, 2024 08:24
FacebookAuth is for iOS app developers who need to support Facebook login but don't want to use the official SDK
//
// FacebookAuth.swift
// GitHub: ethanhuang13
// Twitter: @ethanhuang13
import AuthenticationServices
import SafariServices
/*
Updated:
@berkcebi
berkcebi / progress-indicator-spinning-color.swift
Created August 23, 2018 00:45
Changing the color of a spinning `NSProgressIndicator` using Core Image filters.
extension NSProgressIndicator {
func set(tintColor: NSColor) {
guard let adjustedTintColor = tintColor.usingColorSpace(.deviceRGB) else {
contentFilters = []
return
}
let tintColorRedComponent = adjustedTintColor.redComponent
@Sorix
Sorix / AsynchronousOperation.swift
Last active June 15, 2023 10:50
Subclass of NSOperation (Operation) to make it asynchronous in Swift 3, 4, 5
// Created by Vasily Ulianov on 09.02.17, updated in 2019.
// License: MIT
import Foundation
/// Subclass of `Operation` that adds support of asynchronous operations.
/// 1. Call `super.main()` when override `main` method.
/// 2. When operation is finished or cancelled set `state = .finished` or `finish()`
open class AsynchronousOperation: Operation {
public override var isAsynchronous: Bool {
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@angelolloqui
angelolloqui / UIImage+H568.m
Last active October 6, 2022 16:35
iPhone5 UIImage method swizzling to load -568h images
//
// UIImage+H568.m
//
// Created by Angel Garcia on 9/28/12.
// Copyright (c) 2012 angelolloqui.com. All rights reserved.
//
#import <objc/runtime.h>
@implementation UIImage (H568)