Skip to content

Instantly share code, notes, and snippets.

View peterlevi's full-sized avatar

Peter Levi peterlevi

  • HyperScience
  • Sofia
View GitHub Profile
<html>
<body style="margin: 0; padding: 0;">
<canvas id="canvas" style="width: 200px; height: 200px" width="200" height="200">
</canvas>
<table id="colors" width="100%" border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse; display: inline;">
<tbody>
<tr>
<td style="background-color: #070707">&nbsp;</td>
@peterlevi
peterlevi / treedata.json
Created January 31, 2018 09:03
Sample data for the Front-end HackerRank tree question
{
"data" :
"1/A/Bear
1/A/Lion
1/B/Racoon
1/B/Tiger
2/A/Cat
2/B/Dog
2/C/Horse"
}
@peterlevi
peterlevi / apple_eaters.js
Created September 20, 2017 09:39
The Apple Eaters. A simple JavaScript game we created together with my kids to teach them coding.
/*
The Apple Eaters
A simple JavaScript game we created together with my kids to teach them coding.
Teaches basics of concepts like model/view, reacting to events, DOM manipulation.
*/
const APPLES = 2000;
let player1 = {