Skip to content

Instantly share code, notes, and snippets.


Mitchell Porter mitchellporter

View GitHub Profile
mitchellporter /
Created Jan 30, 2020 — forked from nikcub/
Facebook PHP Source Code from August 2007
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 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 /
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');
mitchellporter / facebook-wca-standard-events.html
Created Oct 16, 2018 — forked from danielmcclure/facebook-wca-standard-events.html
Sample Facebook Standard Events for New Facebook WCA (Website Custom Audience) Pixel
View facebook-wca-standard-events.html
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site -->
fbq('init', '{{facebook pixel}}');
fbq('track', 'PageView');
View async-for-each.js
async function test(){
let arr = [1,2,3];
await* (num) => {
let result = await getData(num);
console.log('after foreach');
You can’t perform that action at this time.