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
| // This service worker file is effectively a 'no-op' that will reset any | |
| // previous service worker registered for the same host:port combination. | |
| // In the production build, this file is replaced with an actual service worker | |
| // file that will precache your site's local assets. | |
| // See https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 | |
| self.addEventListener('install', () => self.skipWaiting()) | |
| self.addEventListener('activate', () => { | |
| self.clients.matchAll({ type: 'window' }).then(windowClients => { |
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
| <script> | |
| mounted () { | |
| window.addEventListener('online', () => | |
| store.dispatch('snackbar', { id: 0, show: false }) | |
| ) | |
| window.addEventListener('offline', () => | |
| store.dispatch('snackbar', { id: 0, show: 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
| // https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications | |
| const isLocalhost = Boolean( | |
| window.location.hostname === 'localhost' || | |
| // [::1] is the IPv6 localhost address. | |
| window.location.hostname === '[::1]' || | |
| // 127.0.0.1/8 is considered localhost for IPv4. | |
| window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) | |
| ) |
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
| $ node -v | |
| > v8.0.0 | |
| $ node | |
| > let codeName = 'carbon' | |
| undefined | |
| > codeName.padStart(10) | |
| ' carbon' | |
| > codeName.padEnd(10) | |
| 'carbon ' |
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
| # https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
| # --disable-gpu currently required, see link above | |
| google-chrome --headless --screenshot --disable-gpu --window-size=1440,900 https://daliborgogic.com/ |
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
| #!/bin/bash | |
| cd /tmp || exit | |
| echo "Downloading Postman ..." | |
| wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz | |
| tar -xzf postman.tar.gz | |
| rm postman.tar.gz | |
| echo "Installing to opt..." | |
| if [ -d "/opt/Postman" ];then | |
| sudo rm -rf /opt/Postman |
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
| // https://w3c.github.io/pointerevents/ | |
| foo.addEventListener('pointerdown', e => { | |
| switch (e.pointerType) { | |
| case 'mouse': | |
| // mouse detected | |
| break | |
| case 'pen': | |
| // pen / stylus detected | |
| break; |
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
| //- https://search.google.com/structured-data/testing-tool#url=daliborgogic.com | |
| //- https://cards-dev.twitter.com/validator | |
| //- https://developers.facebook.com/tools/debug/ | |
| html(itemscope itemtype="http://schema.org/Product") | |
| title Page Title. Maximum length 60-70 characters | |
| meta(name="description" content="Page description. No longer than 155 characters.") | |
| //- Schema.org markup for Google+ |
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
| // https://packagecontrol.io/packages/Terminal | |
| { | |
| "terminal": "/opt/Hyper/hyper", | |
| "parameters": ["%CWD%"] | |
| } |
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
| FROM node:alpine | |
| RUN apk add --no-cache --virtual .gyp \ | |
| python \ | |
| make \ | |
| g++ \ | |
| && npm install \ | |
| [ your npm dependencies here ] \ | |
| && apk del .gyp |