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
export const gatherDeviceIntel = () => { | |
const header = [ | |
navigator.platform, | |
navigator.userAgent, | |
navigator.appVersion, | |
navigator.vendor, | |
window.opera | |
] | |
const dataos = [ | |
{ name: 'Windows Phone', value: 'Windows Phone', version: 'OS' }, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# build stage | |
FROM node:lts-alpine as build-stage | |
WORKDIR /app | |
# Install git (required for @qualitista/i18n package) | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add git | |
COPY package*.json ./ | |
RUN CYPRESS_INSTALL_BINARY=0 npm ci && npm update @qualitista/i18n | |
COPY . . |
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
'use strict' | |
const version = 'v1::' | |
const offlineFundamentals = [ | |
'/assets/css/variables.css', | |
'/assets/css/global.css', | |
'/assets/js/script.min.js', | |
'/index.html', | |
// ... | |
] |
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
* Tracking as of 28th Jan (prolly missed 5-10 movies) * | |
A Star Is Born | |
Spider-Man: Into the Spidey-verse | |
Widows | |
Immortal Machines | |
1+2 | |
The Guilty | |
Cam |
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
export const subdomainRegex = new RegExp('^(([^.]*))', 'g') | |
export const parseSubdomain = hostname => (hostname || window.location.hostname).match(subdomainRegex)[0] |
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
{ | |
"name": "ver-extractor", | |
"description": "Get the version from your package.json", | |
"scripts": { | |
"get-version": "node -pe \"require('./package.json').version\"" | |
} | |
} |
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
const firstAncestor = (el, tagName) => { | |
while(el = el.parentNode && (el.tagName !== tagName.toUpperCase())) | |
return el | |
} | |
// Usage | |
var child = document.getElementById('child') | |
firstAncestor(child, 'div'); //<div id="parent"> |
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
// Minimal jQuery | |
const $$ = document.querySelectorAll.bind(document); | |
const $ = document.querySelector.bind(document); |
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
<body> | |
<blockquote> | |
<p>Photos by <a href="https://source.unsplash.com/">random photographers</a> on <a href="https://unsplash.com/">Unsplash</a></p> | |
</blockquote> | |
<main> | |
<img lazy data-src="https://source.unsplash.com/random/800x600"> | |
<img lazy data-src="https://source.unsplash.com/random/800x600"> | |
<img lazy data-src="https://source.unsplash.com/random/800x600"> | |
<img lazy data-src="https://source.unsplash.com/random/800x600"> |