Skip to content

Instantly share code, notes, and snippets.

View DaveHudson's full-sized avatar

Dave Hudson DaveHudson

View GitHub Profile
@DaveHudson
DaveHudson / service-worker.js
Created March 6, 2018 10:59
Service Worker
importScripts("/precache-manifest.1ffc866b68fc483cce70dd1aa121dd71.js", "https://storage.googleapis.com/workbox-cdn/releases/3.0.0-beta.1/workbox-sw.js");
workbox.precaching.precacheAndRoute(self.__precacheManifest || []);
@DaveHudson
DaveHudson / terminal-notification-icon.sh
Created February 26, 2019 13:31
Bash script to change icon in terminal-notifier
#!/bin/bash
# Copy Terminal.icns
cp "./src/assets/Terminal.icns" "node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/"
# Edit Info.plist
sed -i '' "s/nl.superalloy.oss.terminal-notifier/com.applification.oss.terminal-notifier/g" "node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist"
@DaveHudson
DaveHudson / machine.js
Created November 24, 2019 15:00
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Last active November 27, 2019 15:36
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Created November 27, 2019 17:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Last active November 28, 2019 08:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Created November 28, 2019 09:29
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Last active December 1, 2019 18:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Last active November 30, 2019 15:00
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DaveHudson
DaveHudson / machine.js
Last active December 2, 2019 16:46
Generated by XState Viz: https://xstate.js.org/viz
const authMachine = Machine({
id: 'auth',
initial: 'signin',
context: {},
states: {
signin: {
on: {
SUBMIT: 'loading'
}
},