Skip to content

Instantly share code, notes, and snippets.

View megawac's full-sized avatar

Graeme Yeates megawac

  • Clearpath Robotics
  • Waterloo, Ontario
View GitHub Profile
@megawac
megawac / board-solver.js
Last active July 27, 2016 16:37
rough sudo code for emkay
function checkSquare(matrix, i, j) {
return columnValid(matrix, i) && rowValid(matrix, j)
}
function solvePuzzle(boardMatrix) {
(i, j) = selectFirstUnfilled(boardMatrix)
matrix = boardMatrix.clone()
matrix[i, j] = red
@megawac
megawac / fun.md
Created January 16, 2018 21:03
JaVaScRiPt4FUN
@megawac
megawac / jsbin.uhoVibU.html
Created December 31, 2013 02:51
childList and subtree tests
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/qunit/qunit-git.css" rel="stylesheet" type="text/css" />
<script src="//cdn.jsdelivr.net/es5.shim/2.1.0/es5-shim.min.js"></script>
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/curl.js/0.7.5/jquery/curl.js"></script>
<script src="//code.jquery.com/qunit/qunit-git.js"></script>
<script src="//www.broofa.com/Tools/JSLitmus/JSLitmus.js"></script>
from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.resource import Resource
import json, hmac
from hashlib import sha1
from blinker import signal
class WebhookServer(Resource):