This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const COOKIE_NAME = "__gateway_auth" | |
/** | |
* Gets the cookie with the name from the request headers | |
* @param {Request} request incoming Request | |
* @param {string} name of the cookie to get | |
*/ | |
function getCookie(request, name) { | |
let result = "" | |
const cookieString = request.headers.get("Cookie") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
module.exports = { | |
entry: [ | |
"./client/app.js" | |
], | |
output: { | |
path: __dirname + '/server/public/', | |
filename: "bundle.js" | |
}, | |
module: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Klee is a Software Developer working at nib and organiser of the Newcastle Coders Group. | |
He is an Agile and Clean Code advocate who loves to talk about what we can do to build better quality, maintainable software. | |
Outside of software development Klee is a fan of Martial Arts, Motorcycles, Netflix and spending time with his wife and cats. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
module.exports = { | |
entry: [ | |
"mocha\!./client/test/test.js" // The mocha loader command pointing to the test root. Note the ! is escaped. | |
], | |
output: { | |
path: __dirname + '/client/test/', // Path to where I want testBundle.js to be put | |
filename: "testBundle.js" | |
}, | |
module: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>My Tests bundled by Webpack</title> | |
<!-- External Dependencies --> | |
</head> | |
<body> | |
<div id="mocha" /> | |
</body> | |
<script type="text/javascript" src="./testBundle.js"></script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialiseRoboTracker(); | |
if(me.canMove(me.roboTracker.directionToTheLeft())){ | |
me.roboTracker.turnCCW(); | |
//me.move(me.roboTracker.direction); | |
}else{ | |
while(!canMoveForwardWithHandOnWall()){ | |
me.roboTracker.turnCW(); | |
} | |
} |