#!/bin/python3 | |
import os | |
import sys | |
import shutil | |
import glob | |
from PIL import Image, ImageEnhance | |
import re | |
from fpdf import FPDF |
//Usage | |
const client = websocketOverLibp2p("/ip4/xxx.xx/tcp/xxx/ws", "/x/electrum") | |
const getBlocks = () => { | |
client.send( | |
JSON.stringify({ | |
method: "blockchain.scripthash.listunspent", | |
params: [ | |
"60e518016f265ca054e7044b818b3438d2886138c15cc7563f24bbe29e0cca91", | |
], | |
id: 1, |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
Reloading a page won't update/remove the previous version of its service worker. To make sure you're using the latest version of your service worker, make sure to check the "Update on reload" toggle in the "Application" ⭢ "Service Workers" section of the Chrome DevTools.
To simulate a network condition (e.g.: offline, 3g, etc...) in a service worker on Chrome, uncheck the "Update on reload" toggle.
If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech
This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team
Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it.
All I need to do is npm i -D webpack@next
, right?
+ [email protected]
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/942576182276497409
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/ffc4f050cc489a0280eb7f4cbe36af07
/** | |
* @author ebidel@ (Eric Bidelman) | |
* License Apache-2.0 | |
*/ | |
// Prints the bytes cached by service worker. Breaks out each cache | |
// overall in-memory bytes used by the Cache Storage API for the site. | |
async function getCacheStoragesAssetTotalSize() { | |
// Note: opaque (i.e. cross-domain, without CORS) responses in the cache will return a size of 0. |
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/940022568089554944
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/44ad12f4836e79ca9fa11ba5af6955f7