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 / 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');

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$" "$extension_id%26uc" 
unzip -d "$extension_id-source" "$"

Thx to crxviewer for the magic download URL.

mitchellporter / json_postgres.js
Created Sep 4, 2018 — forked from lucdew/json_postgres.js
Example of json document storage in postgresql and querying (with knex.js)
View json_postgres.js
var connectionString = 'postgres://localhost:5432/postgres';
var Promise=require('bluebird');
var knex = require('knex')({
client: 'pg',
connection: {
user: 'postgres',
database: 'postgres',
port: 5432,
You can’t perform that action at this time.