This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ======= NVM CUSTOMIZATIONS ======= # | |
load-nvmrc() { | |
echo "loading nvm" | |
if [[ -f .nvmrc && -r .nvmrc ]]; then | |
nvm use | |
else | |
echo "Reverting to nvm default version" | |
nvm use default | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useContext } from "react"; | |
import createAuth0Client from "@auth0/auth0-spa-js"; | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname); | |
export const Auth0Context = React.createContext(); | |
export const useAuth0 = () => useContext(Auth0Context); | |
export const Auth0Provider = ({ | |
children, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var child_process = require('child_process'); | |
var email_msg = 'Dear Github User, \n\n Please review this video before pushing directly to master: https://www.youtube.com/watch?v=fmz-K2hLwSI \n\n Thanks,\n Dennis Nedry'; | |
module.exports = function (context, cb) { | |
if (context.body) { | |
var branch = context.body.ref.split('refs/heads/')[1]; | |
if (branch === context.body.repository.master_branch) { | |
var pusher = context.body.pusher; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flatten(objects) { | |
var array = []; | |
objects.forEach(function(obj){ | |
if(Array.isArray(obj)) { | |
array = array.concat(flatten(obj)); | |
} else { | |
array.push(obj); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from 'jquery'; | |
const cache = {}; | |
export const cacheStore = function(key) { | |
return cache[key]; | |
} | |
export const requestWithCache = function(url, refresh) { | |
if (cache[url] && !refresh) { |