noryev / markdown_notes.md

Used for Github, Emails, and Discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown_notes.md

Sample Markdown used for Github, Emails, and Discord

Stats API

Note: stats.bitswap and bitswap.stat can be used interchangeably. See bitswap.stat for more details.

galaxyx.stats.repo([options])

Get stats for the currently used repo.

Note: stats.repo and repo.stat can be used interchangeably. See repo.stat for more details.

galaxyx.stats.bw([options])

Get bandwidth information.

Parameters

None

Options

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

Returns

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 a float, in bytes.
  • rateOut - is a float, in bytes.

Example

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

Sweet Styles

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.

Block Quotes

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.

one 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.

multiline block quote

Code Blocks

Discord also supports code blocks as well. You can make your own code blocks by wrapping your text in backticks (`)

one line code blocks

You can also use three backticks (```) to create multiline code blocks, like this beautifully written haiku.

multiline code blocks

Syntax Highlighting

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...

syntax highlighting

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

asciidoc

autohotkey

autohotkey

bash

bash

coffeescript

coffeescript

cpp (C++)

cpp

cs (C#)

cs

css

css

diff

diff

fix

fix

glsl

glsl

ini

ini

json

json

md (markdown)

md

ml

ml

prolog

prolog

py

py

tex

tex

xl

xl

xml

xml

And you get the idea! Now you're a Discord text markdown expert. Get out there and highlight your statements!

Acknowledgements

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.

About

Used for Github, Emails, and Discord