Skip to content

Instantly share code, notes, and snippets.


M S Morris msmfsd

  • Developer
  • Melbourne, Australia
Block or report user

Report or block msmfsd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
msmfsd / Iframe.js
Last active Jul 18, 2019
React iframe component
View Iframe.js
INIT: ensure Babel/Eslint/Flow is configured for ES Class Fields & Static Properties
JSX USAGE: <Iframe src='' onLoad={myOnloadFunction}/>
import React, { Component, PropTypes } from 'react'
import ReactDOM from 'react-dom'
class Iframe extends Component {
static propTypes: Object = {
msmfsd / es7-async-await.js
Last active Nov 25, 2019
Javascript fetch JSON with ES7 Async Await
View es7-async-await.js
// Async/Await requirements: Latest Chrome/FF browser or Babel:
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill:
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
msmfsd / flattenDeep.js
Last active Jul 16, 2018
Flatten a n-dimensional nested Javascript array
View flattenDeep.js
* Flatten deeply nested array without external library like Immutable
* Simplified ES6 version of lodash flattenDeep functionality
* Reference:
* Requirements: Latest Chrome/FF browser or ES6 transpiler like Babel
const INFINITY = 1 / 0
* Utility flatten array function
msmfsd / load-content.js
Last active Apr 27, 2016
ES6 class to load php/html/* content into a div via jQuery
View load-content.js
// import LoadContent from './load-content.js';
// LoadContent.Load($('#myDiv'), 'http://myContent.php', { id:1, data:mydata }, callbackFunction);
// DEPENDANCIES: jQuery, Babel ES6
"use strict";
* CLASS: LoadContent
* DESC: Load php/html/* content into a div via jQuery
You can’t perform that action at this time.