Skip to content

Instantly share code, notes, and snippets.

View markadamfoster's full-sized avatar

Mark Foster markadamfoster

View GitHub Profile
photoInvoice: {
1: null,
2: null,
3: null,
4: null,
5: null,
6: null,
7: null,
8: null,
9: null,
@markadamfoster
markadamfoster / videoplaybackspeed.js
Created February 1, 2019 05:47
Update video playback speed for Vimeo, etc
// thanks to Kyle Shevlin (https://twitter.com/kyleshevlin)
const videos = [...document.querySelectorAll('video')]
videos.forEach(video => {video.playbackRate = 1.5})
@markadamfoster
markadamfoster / reactContextAPI.js
Created May 4, 2018 16:10
React Context API (with notes)
import React, { Component } from 'react'
/*
STEP 1: Create the new Context
- starts with capital letter
- can (optionally) pass in default context values to the .createContext() call
*/
const CurrentUserContext = React.createContext()
/*