Sample Markdown used for Github, Emails, and Discord
Note: stats.bitswap
and bitswap.stat
can be used interchangeably. See bitswap.stat
for more details.
Get stats for the currently used repo.
Note: stats.repo
and repo.stat
can be used interchangeably. See repo.stat
for more details.
Get bandwidth information.
None
An optional object which may have the following keys:
Name | Type | Default | Description |
---|---|---|---|
peer | PeerId, CID or String |
undefined |
Specifies a peer to print bandwidth for |
proto | String |
undefined |
Specifies a protocol to print bandwidth for |
poll | boolean |
undefined |
Is used to yield bandwidth info at an interval |
interval | Number |
undefined |
The time interval to wait between updating output, if poll is true |
timeout | Number |
undefined |
A timeout in ms |
signal | AbortSignal | undefined |
Can be used to cancel any long running requests started as a result of this call |
Type | Description |
---|---|
AsyncIterable<Object> |
An async iterable that yields IPFS bandwidth information |
Each yielded object contains the following keys:
totalIn
- is a BigInt, in bytes.totalOut
- is a BigInt, in bytes.rateIn
- is afloat
, in bytes.rateOut
- is afloat
, in bytes.
for await (const stats of ipfs.stats.bw()) {
console.log(stats)
}
// { totalIn: BigInt {...},
// totalOut: BigInt {...},
// rateIn: number {...},
// rateOut: number {...} }
A great source of examples can be found in the tests for this API.
Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...
Check Github markdown guids and add them
Italics *italics* or _italics_
Underline italics __*underline italics*__
Bold **bold**
Underline bold __**underline bold**__
Bold Italics ***bold italics***
underline bold italics __***underline bold italics***__
Underline __underline__
Strikethrough ~~Strikethrough~~
Don't want to use markdown? You can slap a backslash in front of your statement, or put your message in a code block, and it'll escape the markdown formatting. You'll see those asterisks as you'd like! Just keep in mind, it doesn't work in messages with edits or underscores.
The syntax to use Block Quotes is > or >>> followed by a space.
> at the beginning of a line of text, creates a single-line block quote.
>>> at the beginning of a line of text, creates a multi-line block quote. All text from >>>
until the end of the message will be included in the quote.
Discord also supports code blocks as well. You can make your own code blocks by wrapping your text in backticks (`)
You can also use three backticks (```) to create multiline code blocks, like this beautifully written haiku.
If you really want to spruce up your code blocks, you can denote a specific language for syntax highlighting, by typing the name of the language you want the code block to expect right after the first three backticks beginning your code block. An example...
There are many different languages in place of Markdown that Discord's syntax highlighting support. Each different language has its own approach to highlight-able syntax. For a full list: https://highlightjs.org/static/demo/. Note that you won't be able to view syntax highlighting on the mobile app.
asciidoc
autohotkey
bash
coffeescript
cpp (C++)
cs (C#)
css
diff
fix
glsl
ini
json
md (markdown)
ml
prolog
py
tex
xl
xml
And you get the idea! Now you're a Discord text markdown expert. Get out there and highlight your statements!
Hammer and Chisel
Discord Highlight.js
A special thanks to Frosty#9449 for their help in making this guide.
If you have any questions or want to get in contact with me, you can add Matthew#2334 on Discord or join my support server.