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
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
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
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
sudo apt-get install zip unzip curl make automake libtool build-essential git screen libgtk-3-0 libsm6 libx11-xcb1 libxft2 libtiff5 libgif7 libxpm4 ispell libncurses5 libgnutls30 libxml2 | |
# to build emacs with gtk gui | |
sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libgnutls28-dev libncurses5-dev libxml2-dev | |
# emacs 27.1 | |
sudo apt install -y autoconf automake autotools-dev bsd-mailx build-essential \ | |
diffstat gnutls-dev imagemagick libasound2-dev libc6-dev libdatrie-dev \ | |
libdbus-1-dev libgconf2-dev libgif-dev libgnutls28-dev libgpm-dev libgtk2.0-dev \ | |
libgtk-3-dev libice-dev libjpeg-dev liblockfile-dev liblqr-1-0 libm17n-dev \ |
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 |
NewerOlder