I hereby claim:
- I am oliverturner on github.
- I am oliverturner (https://keybase.io/oliverturner) on keybase.
- I have a public key ASD59tAQzQ1b7Hv9SGHUb873dztQRwY4dFIvC9DEv-Is1Qo
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Home</title> | |
| <script type="module"> | |
| function someClick() { | |
| alert("hello"); |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| async function totalCacheSize() { | |
| let size = 0; | |
| const cacheNames = await caches.keys(); | |
| for (const cacheName of cacheNames) { | |
| const cache = await caches.open(cacheName); | |
| const cachedRequests = await cache.keys(); | |
| for (const cachedRequest of cachedRequests) { | |
| const cachedResponse = await cache.match(cachedRequest); | |
| const responseBlob = await cachedResponse.blob(); | |
| size += responseBlob.size; |
I hereby claim:
To claim this, I am signing this object:
| const loadcss = (href, media = '') => | |
| new Promise(r => | |
| document.head.appendChild(Object.assign( | |
| document.createElement('link'), | |
| { | |
| onload() { this.media = media; r() }, | |
| rel: 'stylesheet', media: 'only x', href | |
| }) | |
| ) | |
| ) |
| Orta.vscode-jest | |
| Shan.code-settings-sync | |
| christian-kohler.npm-intellisense | |
| christian-kohler.path-intellisense | |
| codezombiech.gitignore | |
| dbaeumer.vscode-eslint | |
| esbenp.prettier-vscode | |
| jasonlhy.vscode-browser-sync | |
| jpoissonnier.vscode-styled-components | |
| kumar-harsh.graphql-for-vscode |
| code --install-extension Orta.vscode-jest | |
| code --install-extension PKief.material-icon-theme | |
| code --install-extension Shan.code-settings-sync | |
| code --install-extension TeddyDD.fish | |
| code --install-extension bungcip.better-toml | |
| code --install-extension capaj.vscode-exports-autocomplete | |
| code --install-extension christian-kohler.npm-intellisense | |
| code --install-extension christian-kohler.path-intellisense | |
| code --install-extension codezombiech.gitignore | |
| code --install-extension dbaeumer.vscode-eslint |
| function getBatteryLevel() { | |
| navigator.bluetooth | |
| .requestDevice({ filters: [{ services: ["battery_service"] }] }) | |
| .then(device => device.gatt.connect()) | |
| .then(server => server.getPrimaryService("battery_service")) | |
| .then(service => service.getCharacteristic("battery_level")) | |
| .then(characteristic => characteristic.readValue()) | |
| .then(value => { | |
| console.log(`> Battery Level is ${value.getUint8(0)}%`); | |
| }) |
| /** | |
| * @author ebidel@ (Eric Bidelman) | |
| * License Apache-2.0 | |
| * | |
| * Shows how to use Puppeeteer's code coverage API to measure CSS/JS coverage across | |
| * different points of time during loading. Great for determining if a lazy loading strategy | |
| * is paying off or working correctly. | |
| * | |
| * Install: | |
| * npm i puppeteer chalk cli-table |
| const stream = require('stream') | |
| const cache = new Map() // you might wanna use an lru here | |
| function createCacheStream (url) { | |
| const buf = [] | |
| return stream.Transform({ | |
| transform: function (data, enc, cb) { | |
| buffer.push(data) | |
| cb(null, data) | |
| }, |