Skip to content

Instantly share code, notes, and snippets.

View infinotiver's full-sized avatar

infinotiver infinotiver

  • India
  • 00:30 (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');

/**
@infinotiver
infinotiver / rules.md
Last active May 22, 2022 06:37
Rules template for your Discord Server

image

Rules template for your Discord Server [Unofficial]

Note
This gist may contain rules which may be similiar to any other gist this is just purely co-incidence or the fact that this gist contains rules fully researched and several sources are used including feedback of some discord users

Introduction

You just got a brilliant idea for a new Discord server and launched it right away, but now you must not only configure the channels and permissions, but also tackle the arduous process of creating a set of rules.