mkdir cli-practice
touch ./cli-practice/readme.md
echo "Hi there, this is a readme file." > ./cli-practice/readme.md
echo "This is the second line of the readme file." >> ./cli-practice/readme.md
mv ./cli-practice/readme.md ./cli-practice/readme.txt
mkdir ./cli-practice/document
mv ./cli-practice/readme.txt ./cli-practice/document/introduction.txt
cp ./cli-practice/document/introduction.txt ./cli-practice/document/readme.txt
echo "The quick brown fox jumps over a lazy dog" > ./cli-practice/document/readme.txt
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
interface HighlightTextConfig { | |
highlightStyle: React.CSSProperties; | |
baseStyle: React.CSSProperties; | |
} | |
export const highlightText = (config?: HighlightTextConfig) => ( | |
literals: TemplateStringsArray, | |
...substitutions: string[] | |
) => ( | |
<div style={config?.baseStyle ?? {}}> |
Markdown Preview Enhanced supports rendering flow charts
, sequence diagrams
, mermaid
, PlantUML
, WaveDrom
, GraphViz
, Vega & Vega-lite
, Ditaa
diagrams.
You can also render TikZ
, Python Matplotlib
, Plotly
and all sorts of other graphs and diagrams by using Code Chunk.
Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.
This feature is powered by flowchart.js.
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.
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
# ./app/Dockerfile | |
# syntax=docker/dockerfile:1 | |
# Comments are provided throughout this file to help you get started. | |
# If you need more help, visit the Dockerfile reference guide at | |
# https://docs.docker.com/engine/reference/builder/ | |
ARG NODE_VERSION=19.5.0 | |
FROM node:${NODE_VERSION}-alpine |
Source: https://developer.chrome.com/docs/capabilities/web-apis/fetch-streaming-requests?hl=zh-cn
const response = await fetch(url);
const reader = response.body.getReader();
// if you want to read the data as text
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
while (true) {
const { value, done } = await reader.read();