- Open a comment thread and scroll to the top
- copy this whole script and paste into the console
- scroll slowly to the bottom of the comment thread
- run
getSlackTranscript()in the console
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
| #!/usr/bin/env tsx | |
| /** | |
| * Create empty datasets for each approved provider on the given network | |
| * | |
| * Usage: | |
| * PRIVATE_KEY=0x... tsx debug/create-datasets-for-all-providers.ts [--mainnet] | |
| * | |
| * This script will: | |
| * 1. Connect to the network (default: Calibration testnet, use --mainnet for mainnet) |
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
| ;(async () => { | |
| const { ethers } = await import('https://cdn.jsdelivr.net/npm/[email protected]/dist/ethers.min.js') | |
| const abi = [ | |
| 'event PieceAdded(uint256 indexed dataSetId,uint256 indexed pieceId,tuple(bytes raw) pieceCid,string[] metadataKeys,string[] metadataValues)', | |
| ] | |
| const iface = new ethers.Interface(abi) | |
| const event = iface.getEvent('PieceAdded') | |
| const getFieldNode = (container, label) => { |
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
| async function* makeGenerator() { | |
| try { | |
| let i = 0 | |
| while (true) { | |
| yield i++ | |
| await new Promise(r => setTimeout(r, 10)) | |
| } | |
| } finally { | |
| console.log(">>> GENERATOR CLEANED UP (finally ran)") | |
| } |
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
| #!/usr/bin/env node | |
| import { execSync } from 'child_process' | |
| // Function to extract package updates from git diff | |
| function getPackageUpdates (startCommit, endCommit) { | |
| try { | |
| let diff | |
| if (!startCommit && !endCommit) { | |
| // No arguments: show HEAD commit changes |
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
| # When consuming changes that are currently in PR for a dependency, run the following: | |
| PKG=ipfs/go-log/v2 | |
| COMMIT=174cfdbd11a553230949ce958e66a90f07772ab6 | |
| go get github.com/$PKG@$COMMIT && go mod tidy | |
| # IF there are multiple go.mod files to update, like in ipfs/kubo for instance, use the following | |
| PKG=ipfs/go-log/v2 | |
| COMMIT=174cfdbd11a553230949ce958e66a90f07772ab6 | |
| go get github.com/$PKG@$COMMIT && find . -name go.mod -execdir go mod tidy \; |
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
| /** | |
| * Simple feature‑detection helpers | |
| * (exported so test code can get 100 % coverage). | |
| */ | |
| export const hasBroadcastChannel = (): boolean => | |
| typeof globalThis.BroadcastChannel === "function"; | |
| export const hasMessageChannel = (): boolean => | |
| typeof globalThis.MessageChannel === "function"; |
please note the ordering of "helia:verified-fetch:trace Invoking plugin:"
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 fs = unixfs(helia) | |
| let barDir = await fs.addDirectory({ path: './bar' }) | |
| const aFileHtml = await fs.addFile({ path: './bar/a-file.html', content: uint8ArrayFromString('<html><body>Hello world</body></html>') }) | |
| barDir = await fs.cp(aFileHtml, barDir, 'a-file.html') | |
| let fooDir = await fs.addDirectory({ path: './foo' }) | |
| fooDir = await fs.cp(barDir, fooDir, 'bar') | |
| let deepDirCid = await fs.addDirectory({}) | |
| deepDirCid = await fs.cp(fooDir, deepDirCid, 'foo') |
While debugging streaming video with the helia-service-worker-gateway, I decided to set up a basic nodejs streaming server that we could ensure a basic test case is working in the browsers, so we knew what to target.
The basic server seems to work in all browsers except for safari.
The steps to generage the attached log files are as follows:
- run
node demo-video-server.js > <browser>.log - open browser, start a new tab
NewerOlder