| Value | Group 1 |
|---|---|
| 1 | Thin |
| 2 | |
| 3 | |
| 4 | Full |
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
| code | city | country | lat | lon | |
|---|---|---|---|---|---|
| ZNZ | ZANZIBAR | TANZANIA | -6.13 | 39.31 | |
| TYO | TOKYO | JAPAN | 35.68 | 139.76 | |
| AKL | AUCKLAND | NEW ZEALAND | -36.85 | 174.78 | |
| BKK | BANGKOK | THAILAND | 13.75 | 100.48 | |
| DEL | DELHI | INDIA | 29.01 | 77.38 | |
| SIN | SINGAPORE | SINGAPOR | 1.36 | 103.75 | |
| BSB | BRASILIA | BRAZIL | -15.67 | -47.43 | |
| RIO | RIO DE JANEIRO | BRAZIL | -22.90 | -43.24 | |
| YTO | TORONTO | CANADA | 43.64 | -79.40 |
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://github.com/nodejs/node/blob/master/doc/api/http2.md | |
| const fs = require('fs') | |
| const http2 = require('http2') | |
| const options = { | |
| key: fs.readFileSync('privkey.pem'), | |
| cert: fs.readFileSync('cert.pem') | |
| } | |
| const server = http2.createSecureServer(options) |
npm i
cat > .env << EOL
CONTENTFUL_SPACE=
CONTENTFUL_DELIVERY_ACCESS_TOKEN=
CONTENTFUL_PREVIEW_ACCESS_TOKEN=
CONTENTFUL_INITIAL_SYNC=true
EOL
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
| dlbr@lnx:~/dev/dlbr-pwa$ npm outdated | |
| Package Current Wanted Latest Location | |
| contentful 4.5.0 4.5.2 4.5.0 dlbr-pwa | |
| dlbr@lnx:~/dev/dlbr-pwa$ npx npm-check -u | |
| npx: installed 218 in 5.926s | |
| ❤️ Your modules look amazing. Keep up the great work. ❤️ | |
| dlbr@lnx:~/dev/dlbr-pwa$ npm update | |
| + contentful@4.5.2 | |
| added 120 packages and updated 4 packages in 4.263s |
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 setCookie = (name, value, days = 7, path = '/') => { | |
| const expires = new Date(Date.now() + days * 864e5).toUTCString() | |
| document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=${path}` | |
| } | |
| const getCookie = name => { | |
| return document.cookie.split('; ').reduce((r, v) => { | |
| const parts = v.split('=') | |
| return parts[0] === name ? decodeURIComponent(parts[1]) : r | |
| }, '') |
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 CACHE_NAME = '$$$toolbox-cache$$$http://localhost:5000/$$$' | |
| function linkIsAvailableOffline (links) { | |
| links.forEach(link => { | |
| const HREF = link.getAttribute('href') | |
| caches.open(CACHE_NAME).then(cache => { | |
| cache.match(HREF).then(response => { | |
| link.setAttribute('data-offline', response ? true : false) | |
| }) |
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
| <template lang="pug"> | |
| svg.icon.icon-settings( | |
| fill="#000000" | |
| height="24" | |
| viewBox="0 0 24 24" | |
| width="24" | |
| xmlns="http://www.w3.org/2000/svg" | |
| role="img" | |
| aria-labelledby="iconSettingsTitle iconSettingsDescription" | |
| ) |
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
| window.addEventListener('load', () => { | |
| const t = performance.timing | |
| // Log performance details: | |
| for (const key of [ | |
| 'fetchStart', | |
| 'connectStart', | |
| 'connectEnd', | |
| 'requestStart', | |
| 'responseStart', | |
| 'responseEnd', |
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
| <!-- set pug as language, jade is only for gist sintax highlight --> | |
| <template lang="jade"> | |
| - var background = 'path(d="M0 0h24v24H0z" fill="none")' | |
| svg(height="0" width="0" style="position:absolute; margin-left: -100%;") | |
| //- If your shape consist of many small chunks, you’ll need to wrap them all with a g tag and add an ID to that group. | |
| g#check-box-outline | |
| #{background} | |
| path(d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z") | |
| g#check-box | |
| #{background} |