Skip to content

Instantly share code, notes, and snippets.

View miguelgazela's full-sized avatar

Miguel Oliveira miguelgazela

View GitHub Profile
@miguelgazela
miguelgazela / JS_Module_Pattern_Template.js
Last active August 29, 2015 13:57
JS Module Pattern Template
var myNamespace = (function () {
var myPrivateVar, myPrivateMethod;
// A private counter variable
myPrivateVar = 0;
// A private function which logs any arguments
myPrivateMethod = function( foo ) {
console.log( foo );
@miguelgazela
miguelgazela / Graph.h
Created January 1, 2013 17:11
C++ template class for Graphs and related algorithms (Dijsktra's, Bellman-Ford, etc.)
/*
* Graph.h
*/
#ifndef GRAPH_H_
#define GRAPH_H_
#include <vector>
#include <list>
#include <queue>
using namespace std;