Skip to content

Instantly share code, notes, and snippets.

@kqdtran
kqdtran / snake.js
Created April 9, 2014 07:07
Snake javascript
var drawingCanvas = document.getElementById('myDrawing');
// Check the element is in the DOM and the browser supports canvas
if (drawingCanvas.getContext) {
// Initaliase a 2-dimensional drawing context
var context = drawingCanvas.getContext('2d');
// All necessary local variables
var HEIGHT = 325;
@kqdtran
kqdtran / index.html
Created October 20, 2013 01:47
Earthquake Map Stat 157
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>