Skip to content

Instantly share code, notes, and snippets.

@theo-armour
Last active October 10, 2017 04:55
Show Gist options
  • Save theo-armour/6c18c4cf3eb26b5595d5 to your computer and use it in GitHub Desktop.
Save theo-armour/6c18c4cf3eb26b5595d5 to your computer and use it in GitHub Desktop.
TA GHMD Cheatsheet.md

Header Tags

#Header 1 ##Header 2 ###Header 3 ####Header 4

Bold and Italics Bold Italicize or italicize

Ordered List

  1. Item (Hit Return key = automatic numbers or bullets)
  2. Item
  3. Item

Blockquotes

Angle bracket on the first line of the blockquote.

Code

// Code is just text indented a bit
which(is_easy) to_remember();

// Markdown extra adds un-indented code blocks too

if (this_is_more_code == true && !indented) {
    // tild wrapped code blocks, also not indented
}

GFM also supports fenced blocks

Footnotes 1

Links Anchor

Inline Image ![Image Tag](direct image URL link)

Horizontal Line —-

Strikethrough Strikethrough

Table Heading | Heading |Heading —- |—- |—- Item | Item | Item Item | Item | Item

Task lists

  • task
  • task

http://www.emoji-cheat-sheet.com/

🔵

Another Header

Footnotes

GitHub Gists Tips and Tricks

Links of interest

Gists API

Typical

application/vnd.github.VERSION.raw application/vnd.github.VERSION.base64 application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json

Using gists to via a CDN to publish web pages

https://gist.github.com/theo-armour/6c18c4cf3eb26b5595d5

https://rawgit.com/theo-armour/6c18c4cf3eb26b5595d5/raw/test.html

not: https://theo-armour.github.io/6c18c4cf3eb26b5595d5/test.html

Embedding Code

<script src="https://gist.github.com/theo-armour/6c18c4cf3eb26b5595d5.js"></script>
  • Hash tag for sub file
<script src="https://gist.github.com/theo-armour/6c18c4cf3eb26b5595d5#file-test-html"></script> <script src="https://gist.github.com/theo-armour/6c18c4cf3eb26b5595d5?file=test.html"></script>
<!doctype html>
<html lang = "en" >
<head>
<meta charset = "utf-8" >
<meta name = "viewport" content= "width=device-width, initial-scale=1">
<meta name = "description" content = "Basic HTML template" >
<meta name = "keywords" content = "JavaScript,GitHub,FOSS,3D,STEM" >
<meta name = "date" content = "2017-09-17" >
<title></title>
<style>
body { font: 12pt monospace; margin: 0 auto; max-width: 800px; }
a { color: crimson; text-decoration: none; }
a:hover, a:focus { background-color: yellow; color: #aaa; text-decoration: underline }
button, input[type=button] { background-color: #ddd; border: none; color: #322; cursor: pointer; padding: 3px 5px; }
button:hover { background: #ccc; color: #fff }
/* #menu { left: 0; margin: 20px; max-width: 300px; position: absolute; top: 0; } */
</style>
</head>
<body>
<div id = "header" >
<div id = "title" ></div>
<div id = "contents" >
<button onclick=(); >button</button>
</div>
</div>
<script src="https://gist.github.com/theo-armour/6c18c4cf3eb26b5595d5#file-test-html"></script>
<div id = "menu" ></div>
<script>
const b = '<br>';
init();
function init() {
let txt;
title.innerHTML = '<h2><a href = "" >' + location.href.split( '/' ).pop().slice( 0, -5 ).replace( /-/g, ' ' ) + '</a></h2>';
txt = 'lorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?';
contents.innerHTML += b + txt;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment