Skip to content

Instantly share code, notes, and snippets.

LP grofit

  • UK
Block or report user

Report or block grofit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
grofit / middleware.js
Created Jan 25, 2015
SocketIO + Passport + Cookie-Sessions
View middleware.js
This is just a hacky approach to get things moving, as passport-socketio library
does not support cookie-sessions.
var Promise = require("bluebird");
var passport = require("passport");
var session = require("cookie-session");
var sessionConfig = {
grofit / AStarPathCalculator.cs
Last active Aug 29, 2015
An example of why inheritance is a poor substitute for composition
View AStarPathCalculator.cs
This is a Path calculator which uses an A* approach
public class AStarPathCalculator : IPathCalculator
IEnumerable<Vector3> FindPathTo(Vector3 startPosition, Vector3 endPosition)
var path = ABPath.Construct(startPosition, endPosition);
return path.vectorList;
grofit / Account.cs
Created Jan 7, 2015
A GOOD Generic Repository Pattern
View Account.cs
public class Account
Guid Id {get;set;}
string Name {get;set;}
You can’t perform that action at this time.