This is a template for a colourful cheatsheet.
It supports some visualization features and code listings using tcolorbox / minted. Just input the language you want (and that is supported by minted) in the codebox environment
Different colour themes will probably be added at some point.
(maybe also a more print friendly black and white alternative)
A blog post on cheatsheets and some of my thoughts on them and this template can be found here.
This is an example illustating how to typeset code in LaTeX, especially in beamer presentations. It uses the metropolis theme.
It is a presentation with one slide per "technique" which include some explanatory comments.
Examples shown are minted, lstlisting, verbatim, tcolorbox and knitR. The main document has the ending ".Rtex" which is required if you want it to be able to run knitR. Otherwise, you can just use normal ".tex".
It is accompanied by a blog post with more information here.
In this blog post, some complications which can arise when using code listings in beamer are discussed (package clashes, etc.), so this might be informative if you want to learn more.
The minted package provides automatic syntax highlighting for source code listings. It uses the excellent pygments highlighter, which provides very high quality highlighting for a wide range of languages.
This example also shows how you can use minted to typeset LaTeX math embedded in your source code.