This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const request = require('request') | |
const jwt = require('jsonwebtoken') | |
const jose = require('jose') | |
const app = express() | |
let client_id = "AppBundleID" // Maybe from client | |
function generateClientSecret() { | |
let private_key = "-----BEGIN PRIVATE KEY-----\n......\n-----END PRIVATE KEY-----" // Should store in a safe place on server side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
class MyViewController : UIViewController { | |
override func loadView() { | |
let view = UIView() | |
view.backgroundColor = .white | |
let textView = UITextView() | |
textView.backgroundColor = UIColor.lightGray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages { | |
stage('Checkout/Build/Test') { | |
steps { | |
checkout([ | |
$class: 'GitSCM', | |
branches: [[name: 'develop']], | |
doGenerateSubmoduleConfigurations: false, | |
extensions: [], submoduleCfg: [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func isSubset(_ a: [Character], _ b: [Character]) -> Bool { | |
return b.filter({ (item) -> Bool in | |
return a.index(of: item) != nil | |
}).count == b.count | |
} | |
isSubset(["A", "B", "C", "D"], ["A", "C"]) | |
isSubset(["A","B","C","D","E"], ["A","D","Z"]) | |
isSubset(["A","D","E"], ["A","A","D","E"]) |