Skip to content

Instantly share code, notes, and snippets.

@polarblau
Last active October 13, 2015 03:58
Show Gist options
  • Save polarblau/4135905 to your computer and use it in GitHub Desktop.
Save polarblau/4135905 to your computer and use it in GitHub Desktop.
Plain html file for quick local JS experiments
function html() {
curl -o ${1-index.html} https://gist.github.com/polarblau/4135905/raw/361a71ab43012ab149744fa4bd4a0e837d0a0200/index.html
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TITLE</title>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
</body>
</html>

Instructions

Do you sometimes find yourself in the need for a basic HTML file to run some Javascript (or CSS) experiments? Try this —

  • Add the contents of the .bash file to a shell profile file
  • Run html to generate an basic index.html in the current directory

or

  • Run html NAME.html to generate a file with a NAME of your choice
  • Start your experiments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment