Skip to content

LouisPetrik/codehints

Repository files navigation

Louis' Programming Cheatsheets - codehints.io

A repertoire of programming-related cheat sheets, created with Markdown. The cheat sheets can be viewed on the website codehints.io but also here on GitHub, in the file explorer. Contributions are welcome.

Table of Contents

Cheatsheets Table of Contents

Here is a list of the content on the website. The links refer to the corrosponding Markdown files.

C++

master -> main/docs

Go

Haskell

PureScript

WebAssembly

Contributing

Contributing is possible via GitHub. Alternatively, you can send in content, content-drafts or content-ideas via Mail: [email protected].

Style Guidelines

The following are Guidelines to myself and others for adding contnet.

Each Markdown file has a header section on top which will be rendered to . Therefore it holds the title, the description etc.

Make sure each file at leasts holds a minimal header with a title:

---
title: The title
---

Each technology has one intro.md in its directory. This file always has
a header like this:

```markdown
---
title: Introduction to Technology-name
sidebar_position: 1
slug: /category/technology-name
---
```

Each of the files has the h2 headings:

  • What is technology-name? (use cases, projects etc. )
  • Hello World in technology-name
  • Further Code examples (optional)
  • Packages (optional)
  • Author's Notes (optional)
  • Sources
  • Additional Ressources

Please do not use uncloses XML tags anywhere as this will break anything. Thank you.

Using MDX

In the markdown pages, React components can be used, thanks to MDX.js. Create a component in the /components directory. Finally, import and render it in a page like this:

---
title: Introduction to React.js
sidebar_position: 1
slug: /category/react
---

import Bar from "@site/src/components/Bar";

# Introduction

A component: <Bar />

Within the React component, React needs to be importet explicitly!

import React, { useState, useRef } from 'react'

Todos

Content

  • ChatGPT Cheatsheet
  • GitHub Copilot Cheatsheet
  • Interfaces in C++
  • Filling out AssemblyScript and TypeScript
  • Basics of C
  • Bun Cheatsheet
  • "Cheatsheet" -> "Cheat sheets"
  • Make links in Repo README work

Make content prettier using admonitions

These can be used to create note, tip, info, caution and danger banners. Usage:

:::note

This is a note.

:::

:::tip

This is a tip

:::

Technical

  • Make search bar results more specific (Maybe rename all "Arrays" to "Arrays in C++" for example) I will equip all pages containing "Array" with some front matter to see, if adding more meta info helps. "Arrays" appears in assemblyscript, go and c++

  • Preview image when sharing via WhatsApp, Twitter etc.