Skip to content

Instantly share code, notes, and snippets.

View eliihen's full-sized avatar
🐵
Jonathan Coulton reference

Eline Henriksen eliihen

🐵
Jonathan Coulton reference
View GitHub Profile
### 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:
@eliihen
eliihen / RESTED_licenses.txt
Created September 16, 2017 14:19
Attribution notices for third party software in RESTED
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.
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 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();
});
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,
})
const originalConsoleError = console.error;
console.error = message => {
if (/(Failed prop type)/.test(message)) {
throw new Error(message);
}
originalConsoleError(message);
};
@eliihen
eliihen / package.json
Last active May 10, 2018 12:53
Adding prop-type error script to package.json
{
"jest": {
"setupFiles": [
"<rootDir>/scripts/throw-on-prop-type-error.js"
]
}
}
!(function() {
try {
console.log('foo');
} catch (o) {
return Promise.reject(o);
}
})();
//# sourceMappingURL=async-iife-ts.js.map
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 {
@eliihen
eliihen / install-asm.sh
Last active December 9, 2021 14:50
Install Anthos Service Mesh with hipster store demo app on GCP
#!/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