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
### Keybase proof | |
I hereby claim: | |
* I am esphen on github. | |
* I am esphen (https://keybase.io/esphen) on keybase. | |
* I have a public key whose fingerprint is 4997 D3C4 0BE0 CB5C DCD5 04B3 EA99 F505 0967 55BE | |
To claim this, I am signing this object: |
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
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE RESTED PRODUCT. | |
----- | |
The following software may be included in this product: @types/react. A copy of the source code may be downloaded from https://www.github.com/DefinitelyTyped/DefinitelyTyped.git. This software contains the following license and notice below: | |
MIT License | |
Copyright (c) Microsoft Corporation. All rights reserved. |
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
if (navigator.serviceWorker && navigator.serviceWorker.controller) { | |
// Add an event to the Service Worker's lifecycle state change event | |
navigator.serviceWorker.controller.onstatechange = event => { | |
// When the worker becomes redundant, that means a new worker is | |
// replacing it and the user is seeing stale content | |
if (event.target.state === 'redundant') { | |
// Replace this with some way to show a notification in your app |
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
// This is a worker that can be deployed in a desperate situation in order | |
// to disable all service worker caching by overwriting the running worker | |
// with a no-op worker. | |
// | |
// Keep it close for when you need it. | |
self.addEventListener('install', () => { | |
// Activate immediately, taking control from any broken service workers | |
self.skipWaiting(); | |
}); |
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
new workboxPlugin.GenerateSW({ | |
swDest: 'service-worker.js', | |
// Take control of all clients as soon as it's activated | |
clientsClaim: true, | |
// Skip the waiting lifecycle and go directly to activating | |
skipWaiting: true, | |
}) |
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
const originalConsoleError = console.error; | |
console.error = message => { | |
if (/(Failed prop type)/.test(message)) { | |
throw new Error(message); | |
} | |
originalConsoleError(message); | |
}; |
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
{ | |
"jest": { | |
"setupFiles": [ | |
"<rootDir>/scripts/throw-on-prop-type-error.js" | |
] | |
} | |
} |
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() { | |
try { | |
console.log('foo'); | |
} catch (o) { | |
return Promise.reject(o); | |
} | |
})(); | |
//# sourceMappingURL=async-iife-ts.js.map |
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 n = (function() { | |
function n() {} | |
return ( | |
(n.prototype.then = function(r, e) { | |
var o = new n(), | |
i = this.s; | |
if (i) { | |
var u = 1 & i ? r : e; | |
if (u) { | |
try { |
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
#!/bin/bash | |
# This script installs Anthos Service Mesh with the hipster store demo app on GCP | |
# Exit on failing command | |
set -e | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
export CLUSTER_NAME=anthos-cluster | |
export CLUSTER_LOCATION=us-central1-c |