Skip to content

Instantly share code, notes, and snippets.

@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active May 13, 2025 13:19
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m
@cherryblossom000
cherryblossom000 / discord highlight.js theme.css
Last active March 28, 2025 22:54
Discord highlight.js theme
:root {
--saturation-factor: 1; /* this varies depending on the user’s settings */
--primary-dark-200: hsl(210, calc(var(--saturation-factor, 1) * 2.9%), 86.7%);
--primary-dark-500: hsl(217, calc(var(--saturation-factor, 1) * 7.6%), 33.5%);
--primary-dark-630: hsl(223, calc(var(--saturation-factor, 1) * 6.9%), 19.8%);
--primary-light-130: hsl(220, calc(var(--saturation-factor, 1) * 13%), 95.5%);
--primary-light-300: hsl(210, calc(var(--saturation-factor, 1) * 9.8%), 80%);
--primary-light-700: hsl(210, calc(var(--saturation-factor, 1) * 9.8%), 20%);
--primary-light-900: hsl(240, calc(var(--saturation-factor, 1) * 7.7%), 2.5%);
--white-500: hsl(0, calc(var(--saturation-factor, 1) * 0%), 100%);
@lyoshenka
lyoshenka / ngrok-selfhosting-setup.md
Last active February 21, 2025 08:33
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems