Webpack 5 Configuration to enable running @azure/storage-blob
in Web Worker using jsdom
to polyfill required XML parser API. JavaScript source code can be copied directly from https://github.com/Azure/azure-sdk-for-js/tree/main/samples/web-workers/js
This file contains 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
From 696505db6647dd182eaa4254c035acf518b35e7d Mon Sep 17 00:00:00 2001 | |
From: Jeremy Meng <yumeng@microsoft.com> | |
Date: Wed, 27 Jul 2022 14:33:04 -1000 | |
Subject: [PATCH] override webpack config using `react-app-rewired` | |
--- | |
sb/react-sb/config-overrides.js | 24 +++++++++++ | |
sb/react-sb/package.json | 4 +- | |
sb/react-sb/src/App.tsx | 5 +++ | |
sb/react-sb/src/testSB.ts | 71 +++++++++++++++++++++++++++++++++ |
This file contains 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
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" | |
const sbClient = new ServiceBusClient(connectionString, { | |
customEndpointAddress: "sb://127.0.0.1", | |
// WebSocket works too | |
// customEndpointAddress: "https://127.0.0.1:3000", | |
// webSocketOptions: { | |
// webSocket: ws, | |
// }, | |
}); |
This file contains 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 { EventHubProducerClient } = require("@azure/event-hubs"); | |
require("@azure/logger").setLogLevel("verbose"); | |
localStorage.debug= "azure*,rhea-promise:error,rhea:events,rhea:frames,rhea:io,rhea:flow" | |
function generateEvents(n, size) { | |
result = []; | |
for (let i = 0; i < n; i++) { | |
const obj = { | |
dataType: "data", |
This file contains 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
strip-json-comments rush.json | jq -c '.projects | map(select(.versionPolicyName | contains("management") | not)) | sort_by(.projectFolder) | .[]' > /workspaces/notes/rush-non-mgmt.log |
This file contains 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
import { | |
BlobServiceClient, | |
ContainerClient, | |
StorageSharedKeyCredential, | |
} from "@azure/storage-blob"; | |
import { ExampleHttpClient } from "./exampleHttpClient.js"; | |
import * as dotenv from "dotenv"; | |
dotenv.config(); |
This file contains 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 client = new BlobServiceClient(url); | |
async function testUploadProgress() { | |
const containerClient = client.getContainerClient("jeremy-test"); | |
const blockBlobClient = containerClient.getBlockBlobClient( | |
"test-upload-progress" | |
); | |
const selectedFile = document.getElementById("input").files[0]; | |
const status = document.getElementById("status"); | |
await blockBlobClient.stageBlock(btoa("1"), selectedFile, selectedFile.size, { |
This file contains 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
FROM microsoft/dotnet:2.2-sdk AS builder | |
WORKDIR /build | |
COPY *.csproj . | |
# Restore with `-r linux-x64` to download the runtime package containing crossgen. | |
RUN dotnet restore -r linux-x64 | |
RUN cp `find ~/.nuget/packages -name crossgen` . | |
# Restore without `-r` option so that the shared runtime will be used to run the app. | |
RUN dotnet restore |
This file contains 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
{ | |
"ignition": { "version": "2.2.0" }, | |
"passwd": { | |
"users": [ | |
{ | |
"name": "core", | |
"passwordHash": "abc123!@#", | |
"sshAuthorizedKeys": [ | |
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIB4sLpLe47zqP2yPXJA2RW1/LXEqOJmte19cr8LlyukIV6YSSfIAlZm9w4xpYaDb7ZJzAtQOMi8smabN/3Ib43KDIxKmUcyz9k3N76JJLDWndQ3ti59wk7QNMbPslK3+7lUacLut4l+BjYNFExu4ZyQb7ke5EIONrMDyEReONzkDQ== rsa-key-20160322" | |
] |
NewerOlder