Skip to content

Instantly share code, notes, and snippets.

Almas Sapargali almassapargali

Block or report user

Report or block almassapargali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
almassapargali / InstagramActivity.swift
Created Jan 11, 2018
UIActivity for Instagram image sharing
View InstagramActivity.swift
import Foundation
import UIKit
private let InstagramAppURL = URL(string: "instagram://app")!
class InstagramActivity: UIActivity, UIDocumentInteractionControllerDelegate {
override class var activityCategory: UIActivityCategory { return .share }
override var activityType: UIActivityType? { return UIActivityType("postToInstagram") }
override var activityTitle: String? { return "Instagram" }
override var activityImage: UIImage? { return #imageLiteral(resourceName: "instagram_activity") }
View gist:068aeccce27b205f527a
/// Zips elements of two signals into pairs. The elements of any Nth pair
/// are the Nth elements of the two input signals.
public func zipWith<T, U, E>(otherSignal: Signal<U, E>)(signal: Signal<T, E>) -> Signal<(T, U), E> {
return Signal { observer in
let lock = NSRecursiveLock() = "org.reactivecocoa.ReactiveCocoa.zipWith"
var signalValues: [T] = []
var otherValues: [U] = []
almassapargali / DefaultParamsSerializer.m
Created Jul 3, 2014
add parameters too all requests
View DefaultParamsSerializer.m
#import "DefaultParamsSerializer.h"
@implementation DefaultParamsSerializer
- (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(id)parameters error:(NSError *__autoreleasing *)error
if (parameters) {
if ([parameters isKindOfClass:[NSDictionary class]]) {
NSMutableDictionary *mParams = [parameters mutableCopy];
mParams[@"key"] = @"value";
You can’t perform that action at this time.