Skip to content

Instantly share code, notes, and snippets.

View andreaganduglia's full-sized avatar

Andrea Ganduglia andreaganduglia

View GitHub Profile
@straker
straker / README.md
Last active July 22, 2024 08:57
Basic Snake HTML and JavaScript Game

Basic Snake HTML and JavaScript Game

Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
@fergiemcdowall
fergiemcdowall / README.md
Last active July 19, 2024 08:48
How to use pandoc to generate HTML from GitHub-flavoured markdown

Here is a little recipe for generating html from github-flavoured markdown. CSS extracted and modified from https://github.com/sindresorhus/github-markdown-css on 22-05-2019. At some point this CSS will probably have to be updated, but for now it works.

  1. Install pandoc 2.x or higher

  2. Save github-markdown.css (below) to ´~/.pandoc/github-markdown.css´

  3. To convert a file called README.md (change as appropriate) run ´pandoc --standalone -c ~/.pandoc/github-markdown.css -f gfm -t html README.md´