Skip to content

Instantly share code, notes, and snippets.

@Abhishek9634
Abhishek9634 / gist:9db02bf2aea3c05f7216d0d42c4cdb64
Created April 3, 2017 13:45 — forked from jeffreycamealy/gist:5104279
Urban Airship AppDelegate initialization code
#import "UAirship.h"
#import "UAPush.h"
============================
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self setupUrbanAirshipForApplication:application withLaunchOptions:launchOptions];
return YES;
}
- (void)applicationWillTerminate:(UIApplication *)application {
swagger: "2.0"
info:
version: 1.0.0
title: Zumba's API
description: Documentation about Zumba's API.
contact:
name: Zumba Engineering Team
email: engineering@zumba.com
url: https://tech.zumba.com
host: apiv3.zumba.com
@Abhishek9634
Abhishek9634 / sublime-command-line.md
Created January 30, 2018 02:32 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

static CXProviderConfiguration * providerConfiguration; // GLOBAL
@property (strong, nonatomic) CXProvider * provider;
@property (weak, nonatomic) NSTimer * providerTimer;
// GETTER DECLARATION
+(CXProviderConfiguration *)providerConfiguration;
// GETTER DEFINATION
+(CXProviderConfiguration *)providerConfiguration {
providerConfiguration = [[CXProviderConfiguration alloc] initWithLocalizedName:@”Name you want to give”];
import Foundation
class Stack<T: CustomStringConvertible>: CustomStringConvertible {
private var array: [T] = []
func pop() -> T? {
let popItem = self.array.popLast()
print("POP ITEM : \(popItem?.description ?? "")")
return popItem
let obj = Stack<String>()
obj.push(item: "A")
obj.push(item: "B")
obj.push(item: "C")
obj.push(item: "D")
obj.push(item: "E")
print("STACK COUNT: \(obj.count)")
print(obj.description)
let _ = obj.pop()
print(obj.description)
let linkList = LinkList<Int>()
linkList.append(element: 0)
linkList.append(element: 1)
linkList.append(element: 2)
linkList.append(element: 3)
linkList.append(element: 4)
linkList.append(element: 5)
print(linkList.description)
linkList.insert(element: 100)
import Foundation
class TreeNode<T> {
var data: T
var leftNode: TreeNode?
var rightNode: TreeNode?
init(data: T,
class BinaryTree<T: Comparable & CustomStringConvertible> {
private var rootNode: TreeNode<T>?
func insert(element: T) {
let node = TreeNode(data: element)
if let rootNode = self.rootNode {
self.insert(rootNode, node)
} else {