Skip to content

Instantly share code, notes, and snippets.

View jasontwuk's full-sized avatar

Jason Liao jasontwuk

View GitHub Profile
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch16-exercise-AMonster</title>
<script src="levels.js"></script>
<style>
.background { background: rgb(52, 166, 251);
table-layout: fixed;
border-spacing: 0; }
.background td { padding: 0; }
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch16-exercise-PausingTheGame</title>
<script src="levels.js"></script>
<!-- <link rel="stylesheet" href="css/game.css"> -->
<style>
.background { background: rgb(52, 166, 251);
table-layout: fixed;
border-spacing: 0; }
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch16-exercise-GameOver</title>
<script src="levels.js"></script>
<!-- <link rel="stylesheet" href="css/game.css"> -->
<style>
.background { background: rgb(52, 166, 251);
table-layout: fixed;
border-spacing: 0; }
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch15-exercise-Tabs</title>
</head>
<body>
<tab-panel>
<div data-tabname="one">Tab one</div>
<div data-tabname="two">Tab two</div>
<div data-tabname="three">Tab three</div>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch15-exercise-Mouse Trail</title>
<style>
.trail { /* className for the trail elements */
position: absolute;
height: 6px;
width: 6px;
border-radius: 3px;
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch15-exercise-Balloon</title>
</head>
<body>
<p id="myP">🎈</p>
<script>
let balloon = document.getElementById("myP");
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch14-exercise-The Cat's Hat</title>
<style>body { min-height: 200px }</style>
</head>
<body>
<img src="img/cat.png" id="cat" style="position: absolute">
<img src="img/hat.png" id="hat" style="position: absolute">
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch14-exercise-Element By Tag Name</title>
</head>
<body>
<h1>Heading with a <span>span</span> element.</h1>
<p>A paragraph with <span>one</span>, <span>two</span> spans.</p>
<script>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ch14-exercise-Build A Table</title>
</head>
<body>
<h1>Mountains</h1>
<div id="mountains"></div>
<script>