Skip to content

Instantly share code, notes, and snippets.

View infinotiver's full-sized avatar
:octocat:
I may be slow to respond.

1NF1N0T1V3R infinotiver

:octocat:
I may be slow to respond.
  • India
  • 17:18 (UTC +05:30)
View GitHub Profile

Generate Table of Contents, automatically

This script will recursively go through the specified directory ("Tutorials" in this case), find all files ending with the specified extension, and generate a table of contents with links to each file along with nested depths for subfolders if any.

Why this snippet?

While making a repository for my javascript tutorials, I encountered an issue, how do I make a table of contents for a repository which has so many files and subfolders (> 35)... I wanted a code snippet which would ease my work, the below code snippet does exactly that... This will make your life easier!

const fs = require('fs');
const path = require('path');

/**
@minibox24
minibox24 / bot.py
Last active February 9, 2022 14:45
Discord Button Akinator
"""
@minibox24
라이선스 관련 안내:
Source 링크 버튼을 삭제하지 마세요.
"""
import discord
from discord.ext.commands import Bot
@matthewzring
matthewzring / markdown-text-101.md
Last active March 7, 2025 16:53
A guide to Markdown on Discord.

Markdown Text 101

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

What this guide covers:

@EvieePy
EvieePy / bot_example.py
Last active March 7, 2025 10:50
A Cogs Example for the rewrite version of - discord.py
import discord
from discord.ext import commands
import sys, traceback
"""This is a multi file example showcasing many features of the command extension and the use of cogs.
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic
understanding and platform for creating your own bot.
These examples make use of Python 3.6.2 and the rewrite version on the lib.
@minism
minism / color.py
Created January 10, 2012 18:39
python terminal colors
# Terminal color definitions
class fg:
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'