Skip to content

Instantly share code, notes, and snippets.


Mitchell Porter mitchellporter

View GitHub Profile
mitchellporter /
Created May 30, 2019 — forked from acrookston/
Xcode pre-action to build custom Info.plist

Automatic build versions from git in Xcode (and other goodies)

Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.

1. Xcode Scheme pre-action

Edit Xcode Scheme and add a pre-action script. Copy the contents of into the pre-action script box.

mitchellporter / async-await.js
Created Jun 6, 2017
async/await IIFE snippet
View async-await.js
(async () => {
const func = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('some async result');
}, 5000);
mitchellporter /
Created Jan 30, 2020 — forked from nikcub/
Facebook PHP Source Code from August 2007
mitchellporter / IAPHelper.txt
Created Mar 19, 2016 — forked from aaalveee/IAPHelper.txt
In App Purchase in Swift, with Receipt Validation
View IAPHelper.txt
import UIKit
import StoreKit
//MARK: SKProductsRequestDelegate
extension IAPHelpers : SKProductsRequestDelegate
func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse)
View Mento.playground
//: Playground - noun: a place where people can play
import UIKit
class Mento: UIView {
// The thickness ratio of our mento, 1.0 being a perfect sphere.
let mentoThicknessScale: CGFloat = 0.60
let shape: UIView = {
mitchellporter /
Created Jul 22, 2019 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)





mitchellporter /
Created Feb 20, 2019 — forked from pbojinov/
Two way iframe communication- Check out working example here:

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.


Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')


mitchellporter / selectors.js
Created Nov 20, 2018 — forked from carolineschnapp/selectors.js
Shopify jQuery selectors.
View selectors.js
To test things out, in your JavaScript console, use selector followed by
.css('outline','1px solid red');
to see what you get.
A sandbox to test all this:
Product Page and Quick View
mitchellporter / ad_account_campaigns_edge.js
Created Oct 17, 2018
Fetching ad account campaigns with Facebook Business Node.js SDK
View ad_account_campaigns_edge.js
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
* @flow
const adsSdk = require('facebook-nodejs-ads-sdk');
You can’t perform that action at this time.