Skip to content

Instantly share code, notes, and snippets.

View danielbowden's full-sized avatar

Daniel Bowden danielbowden

View GitHub Profile
@danielbowden
danielbowden / create_merchant.rb
Created August 18, 2017 03:13
Custom Fastlane action - Uses my PR in fastlane produce to create a new Apple Pay Merchant or ensure that a specific Merchant exists
require 'produce'
require 'produce/merchant'
module Fastlane
module Actions
class CreateMerchantAction < Action
def self.run(params)
Produce.config = params
Produce::Merchant.new.create(params, nil)
end
@kommen
kommen / gist:5743831
Created June 9, 2013 14:56
Queue presentViewController and dismissViewControllerAnimated with dispatch semaphores.
- (void) queueViewControllerTransition:(BOOL)show {
static dispatch_queue_t presentAndDismissViewControllerQueue;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
presentAndDismissViewControllerQueue = dispatch_queue_create("presentAndDismissViewControllerQueue", DISPATCH_QUEUE_SERIAL);
});
dispatch_async(presentAndDismissViewControllerQueue, ^{
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
dispatch_async(dispatch_get_main_queue(), ^{