Skip to content

Instantly share code, notes, and snippets.

@v1taly
v1taly / appStoreConnectAPIFromNode.js
Created July 20, 2020 05:35 — forked from FelDev/appStoreConnectAPIFromNode.js
Boilerplate to authenticate to the App Store Connect API from Node.js
console.log("🏃 appStoreConnectAPIFromNode.js running 🏃‍")
const fs = require('fs');
const jwt = require('jsonwebtoken'); // npm i jsonwebtoken
// You get privateKey, apiKeyId and issuerId from your Apple App Store Connect account
const privateKey = fs.readFileSync("./AuthKey_123456789Z.p8") // this is the file you can only download once and should treat like a real, very precious key.
const apiKeyId = "123456789Z"
const issuerId = "12345678-CLAP-FORR-THIS-GIBBERISHLOLz"
let now = Math.round((new Date()).getTime() / 1000); // Notice the /1000
let nowPlus20 = now + 1199 // 1200 === 20 minutes
@v1taly
v1taly / WebViewWithActivityIndicator.swift
Created January 18, 2020 08:20 — forked from david-hosier/WebViewWithActivityIndicator.swift
Shows a ViewController that contains a WKWebView and UIActivityIndicatorView. This is a pruned down snippet from working code that may or may not work exactly as-is, but should give the basic idea of how to show/hide an activity indicator while a WKWebView is navigating to a URL. The original project this was adapted from was done in XCode 8, an…
import Foundation
import UIKit
import WebKit
class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate {
var webView: WKWebView!
var activityIndicator: UIActivityIndicatorView!
@IBOutlet var webViewContainer: UIView!
#!/bin/bash
# Copyright (c) <2018> <Maksym Rusynyk>
#
# 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
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#