Skip to content

Instantly share code, notes, and snippets.

John D. Pope wwe-johndpope

Block or report user

Report or block wwe-johndpope

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
View NavButtonBarExampleViewController.swift
// NavButtonBarExampleViewController.swift
// XLPagerTabStrip ( )
// Copyright (c) 2017 Xmartlabs ( )
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
wwe-johndpope / HTTPStub.swift
Created Mar 9, 2017
Sample stubbing of mock data from json
View HTTPStub.swift
// HTTPStub.swift
// Karhoo
// Created by John Pope on 9/14/16.
// Copyright © 2016 Karhoo Ltd. All rights reserved.
import Foundation
import UIKit
wwe-johndpope / HTTPStub.swift
Last active Mar 20, 2017
sample gist of OHHTTPStubs + API end points + local json files in bundle
View HTTPStub.swift
import Foundation
import UIKit
import OHHTTPStubs
import SwiftyJSON
@objc class HTTPStub: NSObject {
static let enableHttpStubbing = HTTPStub()
wwe-johndpope /
Last active Apr 5, 2017
save out json to files.
// chomd +x
curl -X GET -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channels.json
curl -X GET -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1092.json
curl -X GET -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1701.json
curl -X GET -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1408.json
curl -X GET -H "access-contro
wwe-johndpope / IndicatorInfo.swift
Created May 8, 2017
simple overloading functions
View IndicatorInfo.swift
public struct IndicatorInfo {
public var title: String
public var image: UIImage?
public var highlightedImage: UIImage?
public init(title: String) {
self.title = title
wwe-johndpope / API.scala
Created Sep 29, 2017
apollo generated code.
View API.scala
// This file was automatically generated and should not be edited.
import Apollo
/// The episodes in the Star Wars trilogy
public enum Episode: String {
case newhope = "NEWHOPE" /// Star Wars Episode IV: A New Hope, released in 1977.
case empire = "EMPIRE" /// Star Wars Episode V: The Empire Strikes Back, released in 1980.
case jedi = "JEDI" /// Star Wars Episode VI: Return of the Jedi, released in 1983.
View Airings.scala
// This file was automatically generated and should not be edited.
import Apollo
public final class SomestringQuery: GraphQLQuery {
public static let operationString =
"query SOMESTRING {" +
" Airings(channelId: \"MTV1\") @paginate(startIndex: 1, maxResults: 5) {" +
" __typename" +
" contentId" +
View Airings.graphql
query Airings {
Airings(channelId: $channelId) @paginate(startIndex: 1, maxResults: 5) {
contentId, mediaId, eventId, programId, partnerProgramId
startDate, endDate, expires
linear, runTime
playbackUrls {
titles {
wwe-johndpope /
Last active Oct 3, 2017
generate swift files.
git clone
cd graphql_swift_gen
mkdir BAM
cd BAM
mkdir Source
cd ..
# optional - install RVM for ruby version managing.
curl -sSL
rvm install ruby --latest
gem install bundler
View linkToTestWatchList.html
You can’t perform that action at this time.