This file contains hidden or 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 * as firebase from 'firebase/app'; | |
import 'firebase/storage'; | |
import 'firebase/database'; | |
// ... | |
firebase.initializeApp(firebaseConfig); |
This file contains hidden or 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 * as firebase from 'firebase'; |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"parserOptions":{ | |
"ecmaVersion": 8 | |
}, |
This file contains hidden or 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
{ | |
"presets": [ | |
[ | |
"env", { | |
"targets": { | |
"browsers": [ | |
"last 2 versions", | |
"IE >= 9" | |
] | |
} |
This file contains hidden or 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
{ | |
"hosting": { | |
"public": "./platforms/browser/www/", | |
"rewrites": [ | |
{ | |
"source": "**", | |
"destination": "/index.html" | |
} | |
], | |
"headers": [ |
This file contains hidden or 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
// listen to the service worker promise in index.html to see if there has been a new update. | |
// condition: the service-worker.js needs to have some kind of change - e.g. increment CACHE_VERSION. | |
window['isUpdateAvailable'] | |
.then(isAvailable => { | |
if (isAvailable) { | |
const toast = this.toastCtrl.create({ | |
message: 'New Update available! Reload the webapp to see the latest juicy changes.', | |
position: 'bottom', | |
showCloseButton: true, | |
}); |
This file contains hidden or 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
// make the whole serviceworker process into a promise so later on we can | |
// listen to it and in case new content is available a toast will be shown | |
window.isUpdateAvailable = new Promise(function(resolve, reject) { | |
// lazy way of disabling service workers while developing | |
if ('serviceWorker' in navigator && ['localhost', '127'].indexOf(location.hostname) === -1) { | |
// register service worker file | |
navigator.serviceWorker.register('service-worker.js') | |
.then(reg => { | |
reg.onupdatefound = () => { | |
const installingWorker = reg.installing; |
This file contains hidden or 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
# ISSUE: | |
# Stuck authenticating with Itunes Store | |
# | |
# ERROR: | |
# Archive upload failed due to the issues listed below. | |
# This action could not be completed. Try again (-22421) | |
cd ~ | |
mv .itmstransporter/ .old_itmstransporter/ | |
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter" |
This file contains hidden or 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
-- === sizeup === | |
-- | |
-- SizeUp emulation for hammerspoon | |
-- | |
-- To use, you can tweak the key bindings and the margins | |
local sizeup = { } | |
-------------- | |
-- Bindings -- |
This file contains hidden or 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
// less error prone DOM manipulation | |
[].filter.call([document.querySelector('.single-selected-class')], item => item) | |
.forEach(item => item.blur()); |